summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky2013-07-09 16:40:58 +0200
committerSteve French2013-07-10 20:08:40 +0200
commit9cbc0b7339b0542a1d13922d2745a2636ce44853 (patch)
treeaf06d88f00880c95d35c584338fbdebf1112843e /fs/cifs/smb2ops.c
parentCIFS: Make SMB2_open use cifs_open_parms struct (diff)
downloadkernel-qcow2-linux-9cbc0b7339b0542a1d13922d2745a2636ce44853.tar.gz
kernel-qcow2-linux-9cbc0b7339b0542a1d13922d2745a2636ce44853.tar.xz
kernel-qcow2-linux-9cbc0b7339b0542a1d13922d2745a2636ce44853.zip
CIFS: Reconnect durable handles for SMB2
On reconnects, we need to reopen file and then obtain all byte-range locks held by the client. SMB2 protocol provides feature to make this process atomic by reconnecting to the same file handle with all it's byte-range locks. This patch adds this capability for SMB2 shares. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 1bc7d7e64cf5..f259e6cc8357 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -227,6 +227,7 @@ smb2_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon,
oparms.disposition = FILE_OPEN;
oparms.create_options = 0;
oparms.fid = &fid;
+ oparms.reconnect = false;
rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL);
if (rc) {
@@ -460,6 +461,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
oparms.disposition = FILE_OPEN;
oparms.create_options = 0;
oparms.fid = fid;
+ oparms.reconnect = false;
rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL);
kfree(utf16_path);
@@ -546,6 +548,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
oparms.disposition = FILE_OPEN;
oparms.create_options = 0;
oparms.fid = &fid;
+ oparms.reconnect = false;
rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL);
if (rc)