aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.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/misc.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/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)
546 oplock &= 0xF; 546 oplock &= 0xF;
547 547
548 if (oplock == OPLOCK_EXCLUSIVE) { 548 if (oplock == OPLOCK_EXCLUSIVE) {
549 cinode->clientCanCacheAll = true; 549 cinode->oplock = CIFS_CACHE_WRITE_FLG | CIFS_CACHE_READ_FLG;
550 cinode->clientCanCacheRead = true;
551 cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n", 550 cifs_dbg(FYI, "Exclusive Oplock granted on inode %p\n",
552 &cinode->vfs_inode); 551 &cinode->vfs_inode);
553 } else if (oplock == OPLOCK_READ) { 552 } else if (oplock == OPLOCK_READ) {
554 cinode->clientCanCacheAll = false; 553 cinode->oplock = CIFS_CACHE_READ_FLG;
555 cinode->clientCanCacheRead = true;
556 cifs_dbg(FYI, "Level II Oplock granted on inode %p\n", 554 cifs_dbg(FYI, "Level II Oplock granted on inode %p\n",
557 &cinode->vfs_inode); 555 &cinode->vfs_inode);
558 } else { 556 } else
559 cinode->clientCanCacheAll = false; 557 cinode->oplock = 0;
560 cinode->clientCanCacheRead = false;
561 }
562} 558}
563 559
564bool 560bool