NFS4: Open files for fscaching
authorDavid Howells <dhowells@redhat.com>
Wed, 5 Dec 2012 16:31:49 +0000 (16:31 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 20 Dec 2012 22:19:42 +0000 (22:19 +0000)
nfs4_file_open() should open files for fscaching.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/nfs/fscache.c
fs/nfs/nfs4file.c

index c817787fbdb4024738a84d804a8800cd7b6dbedf..24d1d1c5fcaf9e50b7528d7ef2a9eff6fcf9f018 100644 (file)
@@ -307,6 +307,7 @@ void nfs_fscache_set_inode_cookie(struct inode *inode, struct file *filp)
                nfs_fscache_inode_unlock(inode);
        }
 }
+EXPORT_SYMBOL_GPL(nfs_fscache_set_inode_cookie);
 
 /*
  * Replace a per-inode cookie due to revalidation detecting a file having
index e7699308364acf6f84fcf62e5f815ed2c74c2b5c..08ddcccb8887cd49ee554edbd4a35f83f59de0e4 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <linux/nfs_fs.h>
 #include "internal.h"
+#include "fscache.h"
 #include "pnfs.h"
 
 #define NFSDBG_FACILITY                NFSDBG_FILE
@@ -74,6 +75,7 @@ nfs4_file_open(struct inode *inode, struct file *filp)
 
        nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
        nfs_file_set_open_context(filp, ctx);
+       nfs_fscache_set_inode_cookie(inode, filp);
        err = 0;
 
 out_put_ctx:
This page took 0.026679 seconds and 5 git commands to generate.