1 From 2c1740098c708b465e87637b237feb2fd98f129a Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <Trond.Myklebust@netapp.com>
3 Date: Mon, 8 Feb 2010 09:32:27 -0500
4 Subject: NFS: Fix a bug in nfs_fscache_release_page()
6 From: Trond Myklebust <Trond.Myklebust@netapp.com>
8 commit 2c1740098c708b465e87637b237feb2fd98f129a upstream.
10 Not having an fscache cookie is perfectly valid if the user didn't mount
11 with the fscache option.
13 This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=15234
15 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 Acked-by: David Howells <dhowells@redhat.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20 fs/nfs/fscache.c | 9 ++++-----
21 1 file changed, 4 insertions(+), 5 deletions(-)
23 --- a/fs/nfs/fscache.c
24 +++ b/fs/nfs/fscache.c
25 @@ -354,12 +354,11 @@ void nfs_fscache_reset_inode_cookie(stru
27 int nfs_fscache_release_page(struct page *page, gfp_t gfp)
29 - struct nfs_inode *nfsi = NFS_I(page->mapping->host);
30 - struct fscache_cookie *cookie = nfsi->fscache;
34 if (PageFsCache(page)) {
35 + struct nfs_inode *nfsi = NFS_I(page->mapping->host);
36 + struct fscache_cookie *cookie = nfsi->fscache;
39 dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",