path: root/fs
diff options
authorSachin Prabhu <sprabhu@redhat.com>2015-02-04 13:10:26 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-19 10:11:08 +0200
commit8b397872340adb46737dc2002ade846834d32cb1 (patch)
treebe51f6172eb4c981e2d6e267b5a42a8b8c38b196 /fs
parent4a673d7acafe13f7ff23dd292ff185623517bf2c (diff)
cifs: smb2_clone_range() - exit on unhandled error
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 34a17d425be6..30f3eb5bc022 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -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;