diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2015-02-04 08:10:26 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2015-03-21 11:56:22 -0400 |
commit | 2477bc58d49edb1c0baf59df7dc093dce682af2b (patch) | |
tree | f620d2798b5c5d2e35a2bdd3f0da9fc853a48561 | |
parent | 90a5a895cc8b284ac522757a01de15e36710c2b9 (diff) |
cifs: smb2_clone_range() - exit on unhandled error
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: <stable@vger.kernel.org>
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>
-rw-r--r-- | fs/cifs/smb2ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 96b5d40a2ece..eab05e1aa587 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -684,7 +684,8 @@ smb2_clone_range(const unsigned int xid, | |||
684 | 684 | ||
685 | /* No need to change MaxChunks since already set to 1 */ | 685 | /* No need to change MaxChunks since already set to 1 */ |
686 | chunk_sizes_updated = true; | 686 | chunk_sizes_updated = true; |
687 | } | 687 | } else |
688 | goto cchunk_out; | ||
688 | } | 689 | } |
689 | 690 | ||
690 | cchunk_out: | 691 | cchunk_out: |