+ fs-cache-release-page-private-in-failed-readahead.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     FS-Cache: Release page->private in failed readahead

has been added to the -mm tree.  Its filename is

     fs-cache-release-page-private-in-failed-readahead.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: David Howells <dhowells@xxxxxxxxxx>

Cause read_cache_pages() to release page-private data on a page for which
add_to_page_cache() fails or the filler function fails.  This permits pages
with caching references associated with them to be cleaned up.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 mm/readahead.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -puN mm/readahead.c~fs-cache-release-page-private-in-failed-readahead mm/readahead.c
--- devel/mm/readahead.c~fs-cache-release-page-private-in-failed-readahead	2006-05-11 10:19:40.000000000 -0700
+++ devel-akpm/mm/readahead.c	2006-05-11 10:23:10.000000000 -0700
@@ -142,6 +142,12 @@ int read_cache_pages(struct address_spac
 		page = list_to_page(pages);
 		list_del(&page->lru);
 		if (add_to_page_cache(page, mapping, page->index, GFP_KERNEL)) {
+			if (PagePrivate(page) && mapping->a_ops->releasepage) {
+				page->mapping = mapping;
+				mapping->a_ops->releasepage(page, GFP_KERNEL);
+				page->mapping = NULL;
+			}
+
 			page_cache_release(page);
 			continue;
 		}
@@ -154,6 +160,15 @@ int read_cache_pages(struct address_spac
 
 				victim = list_to_page(pages);
 				list_del(&victim->lru);
+
+				if (PagePrivate(victim) &&
+				    mapping->a_ops->releasepage) {
+					victim->mapping = mapping;
+					mapping->a_ops->releasepage(victim,
+								GFP_KERNEL);
+					victim->mapping = NULL;
+				}
+
 				page_cache_release(victim);
 			}
 			break;
_

Patches currently in -mm which might be from dhowells@xxxxxxxxxx are

fix-can_share_swap_page-when-config_swap.patch
nfs-permit-filesystem-to-override-root-dentry-on-mount.patch
nfs-permit-filesystem-to-perform-statfs-with-a-known-root-dentry.patch
nfs-abstract-out-namespace-initialisation.patch
nfs-add-dentry-materialisation-op.patch
nfs-split-fs-nfs-inodec-into-inode-superblock-and-namespace-bits.patch
nfs-share-nfs-superblocks-per-protocol-per-server-per-fsid.patch
fs-cache-provide-a-filesystem-specific-syncable-page-bit.patch
fs-cache-add-notification-of-page-becoming-writable-to-vma-ops.patch
fs-cache-avoid-enfile-checking-for-kernel-specific-open-files.patch
fs-cache-generic-filesystem-caching-facility.patch
fs-cache-make-kafs-use-fs-cache.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem.patch
fs-cache-release-page-private-in-failed-readahead.patch
nfs-use-local-caching.patch
fix-incorrect-sa_onstack-behaviour-for-64-bit-processes.patch
net-rxrpc-use-list_move.patch
fs-use-list_move.patch
mutex-subsystem-synchro-test-module.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux