From: Pavel Shilovsky Date: Fri, 18 Jan 2019 23:46:14 +0000 (-0800) Subject: CIFS: Always reset read error to -EIO if no response X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6b15eb18c6a9ddfbb387456c0f1ed86d987cb741;p=linux.git 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 Signed-off-by: Steve French --- diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index f2980f78149c5..77f2c723befa6 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 /*