summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorPavel Shilovsky2019-01-19 00:46:14 +0100
committerSteve French2019-03-05 03:06:39 +0100
commit6b15eb18c6a9ddfbb387456c0f1ed86d987cb741 (patch)
treeb6676f2f9fbd1ff591d35cd0a4cd79a10f121837 /fs/cifs/smb2pdu.c
parentcifs: Accept validate negotiate if server return NT_STATUS_NOT_SUPPORTED (diff)
downloadkernel-qcow2-linux-6b15eb18c6a9ddfbb387456c0f1ed86d987cb741.tar.gz
kernel-qcow2-linux-6b15eb18c6a9ddfbb387456c0f1ed86d987cb741.tar.xz
kernel-qcow2-linux-6b15eb18c6a9ddfbb387456c0f1ed86d987cb741.zip
CIFS: Always reset read error to -EIO if no response
Currently we skip setting a read error to -EIO if a stored result is -ENODATA and a response hasn't been received. With the recent changes in read error processing there shouldn't be cases when -ENODATA is set without a response from the server, so reset the error to -EIO unconditionally. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index f2980f78149c..77f2c723befa 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3236,8 +3236,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
credits_received = le16_to_cpu(shdr->CreditRequest);
/* fall through */
default:
- if (rdata->result != -ENODATA)
- rdata->result = -EIO;
+ rdata->result = -EIO;
}
#ifdef CONFIG_CIFS_SMB_DIRECT
/*