diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2013-09-05 13:01:06 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-09-09 02:49:17 +0400 |
commit | 18cceb6a78f46b65df654e8348fa2093b91b30f6 (patch) | |
tree | d1d1e5468427131f5dc323dd0c92c2fdac443738 /fs/cifs/misc.c | |
parent | 77993be3f32192f28c558290e695a50de7c2dab9 (diff) | |
download | linux-18cceb6a78f46b65df654e8348fa2093b91b30f6.tar.xz |
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.c | 12 |
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 |