diff mbox series

cifs: fix credit computation for compounded commands

Message ID 20181221013113.22745-1-lsahlber@redhat.com (mailing list archive)
State New, archived
Headers show
Series cifs: fix credit computation for compounded commands | expand

Commit Message

Ronnie Sahlberg Dec. 21, 2018, 1:31 a.m. UTC
We need to call wait_for_free_credits() for each of the PDUs in the
compound chain.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 fs/cifs/transport.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 83ff0c25710d..44535ae31fa5 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -815,9 +815,11 @@  compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
 	 * to the same server. We may make this configurable later or
 	 * use ses->maxReq.
 	 */
-	rc = wait_for_free_request(ses->server, timeout, optype);
-	if (rc)
-		return rc;
+	for (i = 0; i < num_rqst; i++) {
+		rc = wait_for_free_request(ses->server, timeout, optype);
+		if (rc)
+			return rc;
+	}
 
 	/*
 	 * Make sure that we sign in the same order that we send on this socket