diff options
author | Suresh Jayaraman <sjayaraman@suse.de> | 2010-07-05 18:12:45 +0530 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-08-02 12:40:36 +0000 |
commit | 9451a9a52f91a4c171cfaca2f6d7a2ce91867b8d (patch) | |
tree | e447d252996e554a053890a75b55456b9926d602 /fs/cifs/file.c | |
parent | d03382ce9a89dbe27cba25130f0b90c0d631d5c5 (diff) | |
download | lwn-9451a9a52f91a4c171cfaca2f6d7a2ce91867b8d.tar.gz lwn-9451a9a52f91a4c171cfaca2f6d7a2ce91867b8d.zip |
cifs: define inode-level cache object and register them
Define inode-level data storage objects (managed by cifsInodeInfo structs).
Each inode-level object is created in a super-block level object and is itself
a data storage object in to which pages from the inode are stored.
The inode object is keyed by UniqueId. The coherency data being used is
LastWriteTime, LastChangeTime and end of file reported by the server.
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index b5fb2a0607b0..d302d941f9ac 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -40,6 +40,7 @@ #include "cifs_unicode.h" #include "cifs_debug.h" #include "cifs_fs_sb.h" +#include "fscache.h" static inline int cifs_convert_flags(unsigned int flags) { @@ -282,6 +283,9 @@ int cifs_open(struct inode *inode, struct file *file) CIFSSMBClose(xid, tcon, netfid); rc = -ENOMEM; } + + cifs_fscache_set_inode_cookie(inode, file); + goto out; } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) { if (tcon->ses->serverNOS) @@ -373,6 +377,8 @@ int cifs_open(struct inode *inode, struct file *file) goto out; } + cifs_fscache_set_inode_cookie(inode, file); + if (oplock & CIFS_CREATE_ACTION) { /* time to set mode which we can not set earlier due to problems creating new read-only files */ |