Fixed https://bugzilla.kernel.org/show_bug.cgi?id=202935 allow write on the same...
authorKovtunenko Oleksandr <alexander198961@gmail.com>
Tue, 14 May 2019 05:52:34 +0000 (05:52 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 16 May 2019 03:27:53 +0000 (22:27 -0500)
Copychunk allows source and target to be on the same file.
For details on restrictions see MS-SMB2 3.3.5.15.6

Signed-off-by: Kovtunenko Oleksandr <alexander198961@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c

index b1a5fcfa3ce126fd1877c02683ee4a4a2f8a23f3..d0cb042732cb0f5e7f322d1121a3bb568b510220 100644 (file)
@@ -1070,11 +1070,6 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
 
        cifs_dbg(FYI, "copychunk range\n");
 
-       if (src_inode == target_inode) {
-               rc = -EINVAL;
-               goto out;
-       }
-
        if (!src_file->private_data || !dst_file->private_data) {
                rc = -EBADF;
                cifs_dbg(VFS, "missing cifsFileInfo on copy range src file\n");