CIFS: Fix credits calculations for reads with errors
authorPavel Shilovsky <pshilov@microsoft.com>
Thu, 17 Jan 2019 23:29:26 +0000 (15:29 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:14:37 +0000 (08:14 +0100)
commit0380ed9b1cd39a582cd14b21072d59fb66bc7d50
tree16494b51050c92eed29a86fd0551f524ef2da854
parent07b9e5e35e8f4189a0a3b87beaca1094d5c18b24
CIFS: Fix credits calculations for reads with errors

commit 8004c78c68e894e4fd5ac3c22cc22eb7dc24cabc upstream.

Currently we mark MID as malformed if we get an error from server
in a read response. This leads to not properly processing credits
in the readv callback. Fix this by marking such a response as
normal received response and process it appropriately.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifssmb.c