aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2013-09-05 05:01:06 -0400
committerSteve French <smfrench@gmail.com>2013-09-08 18:49:17 -0400
commit18cceb6a78f46b65df654e8348fa2093b91b30f6 (patch)
treed1d1e5468427131f5dc323dd0c92c2fdac443738 /fs/cifs/inode.c
parent77993be3f32192f28c558290e695a50de7c2dab9 (diff)
CIFS: Replace clientCanCache* bools with an integer
that prepare the code to handle different types of SMB2 leases. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index ec0f3423cdac..e3bb6477c83f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -101,7 +101,7 @@ cifs_revalidate_cache(struct inode *inode, struct cifs_fattr *fattr)
101 } 101 }
102 102
103 /* don't bother with revalidation if we have an oplock */ 103 /* don't bother with revalidation if we have an oplock */
104 if (cifs_i->clientCanCacheRead) { 104 if (CIFS_CACHE_READ(cifs_i)) {
105 cifs_dbg(FYI, "%s: inode %llu is oplocked\n", 105 cifs_dbg(FYI, "%s: inode %llu is oplocked\n",
106 __func__, cifs_i->uniqueid); 106 __func__, cifs_i->uniqueid);
107 return; 107 return;
@@ -650,7 +650,7 @@ cifs_get_inode_info(struct inode **inode, const char *full_path,
650 cifs_dbg(FYI, "Getting info on %s\n", full_path); 650 cifs_dbg(FYI, "Getting info on %s\n", full_path);
651 651
652 if ((data == NULL) && (*inode != NULL)) { 652 if ((data == NULL) && (*inode != NULL)) {
653 if (CIFS_I(*inode)->clientCanCacheRead) { 653 if (CIFS_CACHE_READ(CIFS_I(*inode))) {
654 cifs_dbg(FYI, "No need to revalidate cached inode sizes\n"); 654 cifs_dbg(FYI, "No need to revalidate cached inode sizes\n");
655 goto cgii_exit; 655 goto cgii_exit;
656 } 656 }
@@ -1661,7 +1661,7 @@ cifs_inode_needs_reval(struct inode *inode)
1661 struct cifsInodeInfo *cifs_i = CIFS_I(inode); 1661 struct cifsInodeInfo *cifs_i = CIFS_I(inode);
1662 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1662 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1663 1663
1664 if (cifs_i->clientCanCacheRead) 1664 if (CIFS_CACHE_READ(cifs_i))
1665 return false; 1665 return false;
1666 1666
1667 if (!lookupCacheEnabled) 1667 if (!lookupCacheEnabled)
@@ -1804,7 +1804,7 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
1804 * We need to be sure that all dirty pages are written and the server 1804 * We need to be sure that all dirty pages are written and the server
1805 * has actual ctime, mtime and file length. 1805 * has actual ctime, mtime and file length.
1806 */ 1806 */
1807 if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && 1807 if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
1808 inode->i_mapping->nrpages != 0) { 1808 inode->i_mapping->nrpages != 0) {
1809 rc = filemap_fdatawait(inode->i_mapping); 1809 rc = filemap_fdatawait(inode->i_mapping);
1810 if (rc) { 1810 if (rc) {