OSDN Git Service

cifs: simplify how we handle credits in compound_send_recv()
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 11 Mar 2019 02:18:58 +0000 (12:18 +1000)
committerSteve French <stfrench@microsoft.com>
Fri, 15 Mar 2019 00:32:35 +0000 (19:32 -0500)
commit257b78099be015762b1b19b3e4c58f90a9913fb7
tree7aa43dfe98b2d0d2f2431b611fb73a38e0d52b40
parent7937ca961c847bda8a75da5d9c34efee9602f6b5
cifs: simplify how we handle credits in compound_send_recv()

Since we can now wait for multiple requests atomically in
wait_for_free_request() we can now greatly simplify the handling
of the credits in this function.

This fixes a potential deadlock where many concurrent compound requests
could each have reserved 1 or 2 credits each but are all blocked
waiting for the final credits they need to be able to issue the requests
to the server.

Set a default timeout of 60 seconds for compounded requests.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/transport.c