mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 14:44:42 +02:00
ksmbd: preserve access denied status for copychunk
The copychunk error mapping handles -EACCES in an independent if statement. The following error chain therefore reaches its final else clause and overwrites STATUS_ACCESS_DENIED with STATUS_UNEXPECTED_IO_ERROR. Join the -EACCES check to the remaining error chain so an access failure is returned as STATUS_ACCESS_DENIED. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
fd309860ef
commit
f7c0366e0a
|
|
@ -8752,7 +8752,7 @@ static int fsctl_copychunk(struct ksmbd_work *work,
|
|||
if (ret < 0) {
|
||||
if (ret == -EACCES)
|
||||
rsp->hdr.Status = STATUS_ACCESS_DENIED;
|
||||
if (ret == -EAGAIN)
|
||||
else if (ret == -EAGAIN)
|
||||
rsp->hdr.Status = STATUS_FILE_LOCK_CONFLICT;
|
||||
else if (ret == -EBADF)
|
||||
rsp->hdr.Status = STATUS_INVALID_HANDLE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user