CIFS: Avoid returning EBUSY to upper layer VFS
authorLong Li <longli@microsoft.com>
Thu, 6 Dec 2018 04:51:06 +0000 (04:51 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 7 Dec 2018 06:59:23 +0000 (00:59 -0600)
commit6ac79291fb7dae4402b306789b1cb85f84687e44
treec8eb9fb92d22d8771064457c75ab43305ed89ac3
parentc988de29ca161823db6a7125e803d597ef75b49c
CIFS: Avoid returning EBUSY to upper layer VFS

EBUSY is not handled by VFS, and will be passed to user-mode. This is not
correct as we need to wait for more credits.

This patch also fixes a bug where rsize or wsize is used uninitialized when
the call to server->ops->wait_mtu_credits() fails.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/file.c