summaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorPavel Shilovsky2013-09-05 11:01:06 +0200
committerSteve French2013-09-09 00:49:17 +0200
commit18cceb6a78f46b65df654e8348fa2093b91b30f6 (patch)
treed1d1e5468427131f5dc323dd0c92c2fdac443738 /fs/cifs/misc.c
parent[CIFS] quiet sparse compile warning (diff)
downloadkernel-qcow2-linux-18cceb6a78f46b65df654e8348fa2093b91b30f6.tar.gz
kernel-qcow2-linux-18cceb6a78f46b65df654e8348fa2093b91b30f6.tar.xz
kernel-qcow2-linux-18cceb6a78f46b65df654e8348fa2093b91b30f6.zip
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/misc.c')
-rw-r--r--fs/cifs/misc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 82a2b9fb528a..138a011633fe 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -546,19 +546,15 @@ void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock)
oplock &= 0xF;
if (oplock == OPLOCK_EXCLUSIVE) {
- cinode->clientCanCacheAll = true;
- cinode->clientCanCacheRead = true;
+ cinode->oplock = CIFS_CACHE_WRITE_FLG | CIFS_CACHE_READ_FLG;
cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n",
&cinode->vfs_inode);
} else if (oplock == OPLOCK_READ) {
- cinode->clientCanCacheAll = false;
- cinode->clientCanCacheRead = true;
+ cinode->oplock = CIFS_CACHE_READ_FLG;
cifs_dbg(FYI, "Level II Oplock granted on inode %p\n",
&cinode->vfs_inode);
- } else {
- cinode->clientCanCacheAll = false;
- cinode->clientCanCacheRead = false;
- }
+ } else
+ cinode->oplock = 0;
}
bool