aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-18 19:20:33 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:30 -0400
commit2e44b2887882134abf353b28867b82645e9f0856 (patch)
tree963236eb542e26b046960f72f9ec47ae8e339a76 /fs/cifs/smb2pdu.c
parentd324f08d6a87149597817f4496ef0f7ac185e8da (diff)
CIFS: Process oplocks for SMB2
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 21b3a652e192..e97c256c8a42 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -872,7 +872,7 @@ int
872SMB2_open(const unsigned int xid, struct cifs_tcon *tcon, __le16 *path, 872SMB2_open(const unsigned int xid, struct cifs_tcon *tcon, __le16 *path,
873 u64 *persistent_fid, u64 *volatile_fid, __u32 desired_access, 873 u64 *persistent_fid, u64 *volatile_fid, __u32 desired_access,
874 __u32 create_disposition, __u32 file_attributes, __u32 create_options, 874 __u32 create_disposition, __u32 file_attributes, __u32 create_options,
875 struct smb2_file_all_info *buf) 875 __u8 *oplock, struct smb2_file_all_info *buf)
876{ 876{
877 struct smb2_create_req *req; 877 struct smb2_create_req *req;
878 struct smb2_create_rsp *rsp; 878 struct smb2_create_rsp *rsp;
@@ -895,9 +895,9 @@ SMB2_open(const unsigned int xid, struct cifs_tcon *tcon, __le16 *path,
895 if (rc) 895 if (rc)
896 return rc; 896 return rc;
897 897
898 /* if (server->oplocks) 898 if (server->oplocks)
899 req->RequestedOplockLevel = SMB2_OPLOCK_LEVEL_BATCH; 899 req->RequestedOplockLevel = *oplock;
900 else */ 900 else
901 req->RequestedOplockLevel = SMB2_OPLOCK_LEVEL_NONE; 901 req->RequestedOplockLevel = SMB2_OPLOCK_LEVEL_NONE;
902 req->ImpersonationLevel = IL_IMPERSONATION; 902 req->ImpersonationLevel = IL_IMPERSONATION;
903 req->DesiredAccess = cpu_to_le32(desired_access); 903 req->DesiredAccess = cpu_to_le32(desired_access);
@@ -954,6 +954,8 @@ SMB2_open(const unsigned int xid, struct cifs_tcon *tcon, __le16 *path,
954 buf->NumberOfLinks = cpu_to_le32(1); 954 buf->NumberOfLinks = cpu_to_le32(1);
955 buf->DeletePending = 0; 955 buf->DeletePending = 0;
956 } 956 }
957
958 *oplock = rsp->OplockLevel;
957creat_exit: 959creat_exit:
958 free_rsp_buf(resp_buftype, rsp); 960 free_rsp_buf(resp_buftype, rsp);
959 return rc; 961 return rc;