public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page()
@ 2010-02-05 22:43 Trond Myklebust
  2010-02-05 22:43 ` [PATCH 2/2] NFS: Fix the mapping of the NFSERR_SERVERFAULT error Trond Myklebust
  2010-02-07 11:26 ` [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Suresh Jayaraman
  0 siblings, 2 replies; 15+ messages in thread
From: Trond Myklebust @ 2010-02-05 22:43 UTC (permalink / raw)
  To: linux-nfs; +Cc: Trond Myklebust

Not having an fscache cookie is perfectly valid if the user didn't mount
with the fscache option.

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=15234

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
---
 fs/nfs/fscache.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index fa58800..534adb8 100644
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -355,11 +355,11 @@ void nfs_fscache_reset_inode_cookie(struct inode *inode)
 int nfs_fscache_release_page(struct page *page, gfp_t gfp)
 {
 	struct nfs_inode *nfsi = NFS_I(page->mapping->host);
-	struct fscache_cookie *cookie = nfsi->fscache;
-
-	BUG_ON(!cookie);
 
 	if (PageFsCache(page)) {
+		struct fscache_cookie *cookie = nfsi->fscache;
+
+		BUG_ON(!cookie);
 		dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
 			 cookie, page, nfsi);
 
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-02-09 14:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-05 22:43 [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Trond Myklebust
2010-02-05 22:43 ` [PATCH 2/2] NFS: Fix the mapping of the NFSERR_SERVERFAULT error Trond Myklebust
2010-02-05 23:12   ` Chuck Lever
2010-02-08 15:12     ` Trond Myklebust
2010-02-07 11:26 ` [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Suresh Jayaraman
2010-02-08 13:23   ` Trond Myklebust
2010-02-08 14:50     ` Trond Myklebust
2010-02-08 16:33       ` Suresh Jayaraman
2010-02-08 16:39         ` Trond Myklebust
2010-02-09  6:26           ` Suresh Jayaraman
2010-02-08 14:59     ` [PATCH 0/2] Fix for the nfs_release_page() bug Trond Myklebust
     [not found]       ` <20100208145942.17581.81775.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-08 14:59         ` [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Trond Myklebust
2010-02-08 14:59         ` [PATCH 2/2] NFS: Remove a redundant check for PageFsCache in nfs_migrate_page() Trond Myklebust
     [not found]       ` <20100208145942.17581.83842.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-09 14:53         ` [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() David Howells
     [not found]       ` <20100208145942.17581.12206.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-09 14:54         ` [PATCH 2/2] NFS: Remove a redundant check for PageFsCache in nfs_migrate_page() David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox