cifs: smb2_clone_range() - exit on unhandled error
authorSachin Prabhu <[email protected]>
Wed, 4 Feb 2015 13:10:26 +0000 (13:10 +0000)
committerSteve French <[email protected]>
Sat, 21 Mar 2015 15:56:22 +0000 (10:56 -0500)
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.

Cc: <[email protected]>
Signed-off-by: Sachin Prabhu <[email protected]>
Signed-off-by: Steve French <[email protected]>
Signed-off-by: Steve French <[email protected]>
fs/cifs/smb2ops.c

index 96b5d40a2ece611b27ed19668cc4b7b665605113..eab05e1aa587424863d6914eb351da9fdcf17437 100644 (file)
@@ -684,7 +684,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: