summaryrefslogtreecommitdiff
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2013-09-05 16:11:28 +0400
committerSteve French <smfrench@gmail.com>2013-09-10 07:52:05 +0400
commit53ef1016fd0e4bab128a24f7fe06b9cdb2afdc31 (patch)
treeed65cd590e0b813a3643f20e752483c48c95fa11 /fs/cifs/file.c
parent18cceb6a78f46b65df654e8348fa2093b91b30f6 (diff)
downloadlinux-53ef1016fd0e4bab128a24f7fe06b9cdb2afdc31.tar.xz
CIFS: Store lease state itself rather than a mapped oplock value
and separate smb20_operations struct. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ad14d3c66b25..188b2470b1fb 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -313,8 +313,7 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
* If the server returned a read oplock and we have mandatory brlocks,
* set oplock level to None.
*/
- if (oplock == server->vals->oplock_read &&
- cifs_has_mand_locks(cinode)) {
+ if (server->ops->is_read_op(oplock) && cifs_has_mand_locks(cinode)) {
cifs_dbg(FYI, "Reset oplock val from read to None due to mand locks\n");
oplock = 0;
}