summaryrefslogtreecommitdiff
path: root/fs/nfs/fscache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-11 14:06:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-11 14:06:28 -0800
commitefa82bab8e3509bb2c4a8044de5909b8bab96cfd (patch)
tree99288d83deb78f03a9fe6b1f5783579ceca6f862 /fs/nfs/fscache.c
parent06a57f4f20d7bf7c3796abd541a7d400483a4596 (diff)
parentfdcb45777a3d1689c5541e1f85ee3ebbd197d2c1 (diff)
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFS: Fix the mapping of the NFSERR_SERVERFAULT error NFS: Remove a redundant check for PageFsCache in nfs_migrate_page() NFS: Fix a bug in nfs_fscache_release_page()
Diffstat (limited to 'fs/nfs/fscache.c')
-rw-r--r--fs/nfs/fscache.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index fa588006588..237874f1af2 100644
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -354,12 +354,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 nfs_inode *nfsi = NFS_I(page->mapping->host);
+ struct fscache_cookie *cookie = nfsi->fscache;
+
+ BUG_ON(!cookie);
dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
cookie, page, nfsi);