Commit 2477bc58 authored by Sachin Prabhu's avatar Sachin Prabhu Committed by Steve French

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: default avatarSachin Prabhu <sprabhu@redhat.com>
Signed-off-by: default avatarSteve French <steve.french@primarydata.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 90a5a895
...@@ -684,7 +684,8 @@ smb2_clone_range(const unsigned int xid, ...@@ -684,7 +684,8 @@ smb2_clone_range(const unsigned int xid,
/* No need to change MaxChunks since already set to 1 */ /* No need to change MaxChunks since already set to 1 */
chunk_sizes_updated = true; chunk_sizes_updated = true;
} } else
goto cchunk_out;
} }
cchunk_out: cchunk_out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment