Skip to content

Commit

Permalink
cifs: smb2_clone_range() - exit on unhandled error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
spuiuk authored and smfrench committed Mar 21, 2015
1 parent 90a5a89 commit 2477bc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/smb2ops.c
Expand Up @@ -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:
Expand Down

0 comments on commit 2477bc5

Please sign in to comment.