cifsd: Call smb2_set_err_rsp() in smb2_read/smb2_write error path
Call smb2_set_err_rsp() in smb2_read/smb2_write error path. Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
Родитель
204fcceb7c
Коммит
a4382db9ba
|
@ -5820,8 +5820,8 @@ int smb2_read(struct ksmbd_work *work)
|
|||
le64_to_cpu(req->VolatileFileId),
|
||||
le64_to_cpu(req->PersistentFileId));
|
||||
if (!fp) {
|
||||
rsp->hdr.Status = STATUS_FILE_CLOSED;
|
||||
return -ENOENT;
|
||||
err = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!(fp->daccess & (FILE_READ_DATA_LE | FILE_READ_ATTRIBUTES_LE))) {
|
||||
|
@ -6057,7 +6057,7 @@ int smb2_write(struct ksmbd_work *work)
|
|||
{
|
||||
struct smb2_write_req *req;
|
||||
struct smb2_write_rsp *rsp, *rsp_org;
|
||||
struct ksmbd_file *fp = NULL;
|
||||
struct ksmbd_file *fp;
|
||||
loff_t offset;
|
||||
size_t length;
|
||||
ssize_t nbytes;
|
||||
|
@ -6082,8 +6082,8 @@ int smb2_write(struct ksmbd_work *work)
|
|||
fp = ksmbd_lookup_fd_slow(work, le64_to_cpu(req->VolatileFileId),
|
||||
le64_to_cpu(req->PersistentFileId));
|
||||
if (!fp) {
|
||||
rsp->hdr.Status = STATUS_FILE_CLOSED;
|
||||
return -ENOENT;
|
||||
err = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!(fp->daccess & (FILE_WRITE_DATA_LE | FILE_READ_ATTRIBUTES_LE))) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче