cifs: smb2_clone_range() - exit on unhandled error
Subsystems (2)
PATCH 1/1 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.
--- fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/cifs/smb2ops.c +2 -1
@@ -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:
Signature · 1 line
2.1.0
Steve French
AppliedMerged into cifs-2.6.git
Quoted 35 lines · Sachin Prabhu
While attempting to clone a file on a samba server, we receive a
STATUS_INVALID_DEVICE_REQUEST. This is mapped to-EOPNOTSUPPwhich isn't handled insmb2_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]>--- fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/cifs/smb2ops.c +2
-2@@ -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: --2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Thanks, Steve