]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cifs: smb2_clone_range() - exit on unhandled error
authorSachin Prabhu <sprabhu@redhat.com>
Wed, 4 Feb 2015 13:10:26 +0000 (13:10 +0000)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 13 Apr 2015 15:48:56 +0000 (16:48 +0100)
commit 2477bc58d49edb1c0baf59df7dc093dce682af2b upstream.

While attempting to clone a file on a samba server, we receive a
STATUS_INVALID_DEVICE_REQUEST. This is mapped to -EOPNOTSUPP which
isn't handled in smb2_clone_range(). We end up looping in the while loop
making same call to the samba server over and over again.

The proposed fix is to exit and return the error value when encountered
with an unhandled error.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <steve.french@primarydata.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
fs/cifs/smb2ops.c

index f325c59e12e6846624ca690ac883c9c8154d60d0..772ee0ecf32aa2758679f83c310f014458021a1f 100644 (file)
@@ -630,7 +630,8 @@ smb2_clone_range(const unsigned int xid,
 
                        /* No need to change MaxChunks since already set to 1 */
                        chunk_sizes_updated = true;
-               }
+               } else
+                       goto cchunk_out;
        }
 
 cchunk_out: