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:13:44 +0000 (08:13 +0100)
commit482592b71d257f4e674505af72d8e23405a64478
tree6411650004bea8974fad521038e0bf17a700d0d9
parent8a9c970fabb704846e527fdd4eeca0cab3a91137
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