]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/shmem.c
mm: shmem: change remove_from_page_cache
[mirror_ubuntu-bionic-kernel.git] / mm / shmem.c
index 41f82bb59eec5c083e254d5db10e0eb747412ec2..88593586bdb7f92022dc6ca7b95be89508dd88e9 100644 (file)
@@ -779,7 +779,7 @@ static int shmem_notify_change(struct dentry *dentry, struct iattr *attr)
                         * If truncating down to a partial page, then
                         * if that page is already allocated, hold it
                         * in memory until the truncation is over, so
-                        * truncate_partial_page cannnot miss it were
+                        * truncate_partial_page cannot miss it were
                         * it assigned to swap.
                         */
                        if (newsize & (PAGE_CACHE_SIZE-1)) {
@@ -1081,7 +1081,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
        shmem_recalc_inode(inode);
 
        if (swap.val && add_to_swap_cache(page, swap, GFP_ATOMIC) == 0) {
-               remove_from_page_cache(page);
+               delete_from_page_cache(page);
                shmem_swp_set(info, entry, swap.val);
                shmem_swp_unmap(entry);
                if (list_empty(&info->swaplist))
@@ -1091,7 +1091,6 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
                spin_unlock(&info->lock);
                swap_shmem_alloc(swap);
                BUG_ON(page_mapped(page));
-               page_cache_release(page);       /* pagecache ref */
                swap_writepage(page, wbc);
                if (inode) {
                        mutex_lock(&shmem_swaplist_mutex);