From patchwork Fri Dec 21 01:31:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronnie Sahlberg X-Patchwork-Id: 10739807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8227C13AD for ; Fri, 21 Dec 2018 01:31:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 730C92894C for ; Fri, 21 Dec 2018 01:31:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66E1228965; Fri, 21 Dec 2018 01:31:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0635F2894C for ; Fri, 21 Dec 2018 01:31:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732650AbeLUBbU (ORCPT ); Thu, 20 Dec 2018 20:31:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731379AbeLUBbU (ORCPT ); Thu, 20 Dec 2018 20:31:20 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 29F74D7939; Fri, 21 Dec 2018 01:31:20 +0000 (UTC) Received: from test1135.test.redhat.com (vpn2-54-94.bne.redhat.com [10.64.54.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF96358B3; Fri, 21 Dec 2018 01:31:19 +0000 (UTC) From: Ronnie Sahlberg To: Linux CIFS mailing list Cc: Steve French Subject: [PATCH] cifs: fix credit computation for compounded commands Date: Fri, 21 Dec 2018 11:31:13 +1000 Message-Id: <20181221013113.22745-1-lsahlber@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 21 Dec 2018 01:31:20 +0000 (UTC) Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We need to call wait_for_free_credits() for each of the PDUs in the compound chain. Signed-off-by: Ronnie Sahlberg --- fs/cifs/transport.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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