diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2019-01-18 15:54:34 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-05-02 21:41:32 +0100 |
commit | 5cdc9c037ceb9e89464d48f7f3423fbff4d86b99 (patch) | |
tree | 38624baa369c8848224953a8369736992b722647 /fs | |
parent | 10113f160c0d99795a65c65bc04cac6924bd4145 (diff) |
CIFS: Do not consider -ENODATA as stat failure for reads
commit 082aaa8700415f6471ec9c5ef0c8307ca214989a upstream.
When doing reads beyound the end of a file the server returns
error STATUS_END_OF_FILE error which is mapped to -ENODATA.
Currently we report it as a failure which confuses read stats.
Change it to not consider -ENODATA as failure for stat purposes.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 5fc7decf38e5..9e432368485d 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1861,7 +1861,7 @@ smb2_readv_callback(struct mid_q_entry *mid) rdata->result = -EIO; } - if (rdata->result) + if (rdata->result && rdata->result != -ENODATA) cifs_stats_fail_inc(tcon, SMB2_READ_HE); queue_work(cifsiod_wq, &rdata->work); |