]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/nfs/fscache.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / fs / nfs / fscache.c
index fa588006588dd3403bb9a883eedc79ddc4588655..a6b16ed932291cb524d90feb49ae4ab48f878032 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/nfs_fs_sb.h>
 #include <linux/in6.h>
 #include <linux/seq_file.h>
+#include <linux/slab.h>
 
 #include "internal.h"
 #include "iostat.h"
@@ -354,12 +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 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);