diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2013-09-05 05:01:06 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-09-08 18:49:17 -0400 |
commit | 18cceb6a78f46b65df654e8348fa2093b91b30f6 (patch) | |
tree | d1d1e5468427131f5dc323dd0c92c2fdac443738 /fs/cifs/smb2misc.c | |
parent | 77993be3f32192f28c558290e695a50de7c2dab9 (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/smb2misc.c')
-rw-r--r-- | fs/cifs/smb2misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index 314bd60f30ce..8d1a8898fd13 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c | |||
@@ -380,9 +380,9 @@ cifs_convert_path_to_utf16(const char *from, struct cifs_sb_info *cifs_sb) | |||
380 | __le32 | 380 | __le32 |
381 | smb2_get_lease_state(struct cifsInodeInfo *cinode) | 381 | smb2_get_lease_state(struct cifsInodeInfo *cinode) |
382 | { | 382 | { |
383 | if (cinode->clientCanCacheAll) | 383 | if (CIFS_CACHE_WRITE(cinode)) |
384 | return SMB2_LEASE_WRITE_CACHING | SMB2_LEASE_READ_CACHING; | 384 | return SMB2_LEASE_WRITE_CACHING | SMB2_LEASE_READ_CACHING; |
385 | else if (cinode->clientCanCacheRead) | 385 | else if (CIFS_CACHE_READ(cinode)) |
386 | return SMB2_LEASE_READ_CACHING; | 386 | return SMB2_LEASE_READ_CACHING; |
387 | return 0; | 387 | return 0; |
388 | } | 388 | } |
@@ -576,7 +576,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) | |||
576 | cifs_dbg(FYI, "file id match, oplock break\n"); | 576 | cifs_dbg(FYI, "file id match, oplock break\n"); |
577 | cinode = CIFS_I(cfile->dentry->d_inode); | 577 | cinode = CIFS_I(cfile->dentry->d_inode); |
578 | 578 | ||
579 | if (!cinode->clientCanCacheAll && | 579 | if (!CIFS_CACHE_WRITE(cinode) && |
580 | rsp->OplockLevel == SMB2_OPLOCK_LEVEL_NONE) | 580 | rsp->OplockLevel == SMB2_OPLOCK_LEVEL_NONE) |
581 | cfile->oplock_break_cancelled = true; | 581 | cfile->oplock_break_cancelled = true; |
582 | else | 582 | else |