diff options
author | Steve French <stfrench@microsoft.com> | 2019-03-29 04:32:49 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-04-01 21:33:34 +0200 |
commit | 153322f7536a181e4d1b288aa6f01c0ce65f5c7c (patch) | |
tree | c4cc94644199173ea35a722fec2219758b437e49 /fs/cifs/smb2file.c | |
parent | cifs: fix kref underflow in close_shroot() (diff) | |
download | linux-153322f7536a181e4d1b288aa6f01c0ce65f5c7c.tar.xz linux-153322f7536a181e4d1b288aa6f01c0ce65f5c7c.zip |
smb3: Fix enumerating snapshots to Azure
Some servers (see MS-SMB2 protocol specification
section 3.3.5.15.1) expect that the FSCTL enumerate snapshots
is done twice, with the first query having EXACTLY the minimum
size response buffer requested (16 bytes) which refreshes
the snapshot list (otherwise that and subsequent queries get
an empty list returned). So had to add code to set
the maximum response size differently for the first snapshot
query (which gets the size needed for the second query which
contains the actual list of snapshots).
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org> # 4.19+
Diffstat (limited to 'fs/cifs/smb2file.c')
-rw-r--r-- | fs/cifs/smb2file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c index b204e84b87fb..ac97e0c01d4e 100644 --- a/fs/cifs/smb2file.c +++ b/fs/cifs/smb2file.c @@ -74,7 +74,7 @@ smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, fid->volatile_fid, FSCTL_LMR_REQUEST_RESILIENCY, true /* is_fsctl */, (char *)&nr_ioctl_req, sizeof(nr_ioctl_req), - NULL, NULL /* no return info */); + CIFSMaxBufSize, NULL, NULL /* no return info */); if (rc == -EOPNOTSUPP) { cifs_dbg(VFS, "resiliency not supported by server, disabling\n"); |