summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorSteve French2019-04-04 07:41:04 +0200
committerSteve French2019-05-08 06:24:54 +0200
commit973189aba69e59f11d987c21bd18409e58ece6fd (patch)
treec454b0d120af131c2aaedc5fdb297e1f0aca1c8c /fs/cifs/smb2ops.c
parentCIFS: check CIFS_MOUNT_NO_DFS when trying to reuse existing sb (diff)
downloadkernel-qcow2-linux-973189aba69e59f11d987c21bd18409e58ece6fd.tar.gz
kernel-qcow2-linux-973189aba69e59f11d987c21bd18409e58ece6fd.tar.xz
kernel-qcow2-linux-973189aba69e59f11d987c21bd18409e58ece6fd.zip
SMB3: update comment to clarify enumerating snapshots
Trivial update to comment suggested by Pavel. Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index c36ff0d1fe2a..ab4737e3c31f 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1821,6 +1821,14 @@ smb3_enum_snapshots(const unsigned int xid, struct cifs_tcon *tcon,
u32 max_response_size;
struct smb_snapshot_array snapshot_in;
+ /*
+ * On the first query to enumerate the list of snapshots available
+ * for this volume the buffer begins with 0 (number of snapshots
+ * which can be returned is zero since at that point we do not know
+ * how big the buffer needs to be). On the second query,
+ * it (ret_data_len) is set to number of snapshots so we can
+ * know to set the maximum response size larger (see below).
+ */
if (get_user(ret_data_len, (unsigned int __user *)ioc_buf))
return -EFAULT;