CIFS: Do not consider -ENODATA as stat failure for reads
authorPavel Shilovsky <pshilov@microsoft.com>
Fri, 18 Jan 2019 23:54:34 +0000 (15:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2019 16:30:11 +0000 (17:30 +0100)
commite9d56f920bb26eee1a1e574463e7a1fea5a1164e
tree451b4afc39315498ac56d42024319482b30f8715
parent6e7045ec336be8eafa26270efe013e5a17371cf6
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>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2pdu.c