From patchwork Sat Mar 12 23:48:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 630851 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2CNmFJh020840 for ; Sat, 12 Mar 2011 23:48:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754195Ab1CLXsO (ORCPT ); Sat, 12 Mar 2011 18:48:14 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:41494 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752584Ab1CLXsO (ORCPT ); Sat, 12 Mar 2011 18:48:14 -0500 Received: by iyb26 with SMTP id 26so3813309iyb.19 for ; Sat, 12 Mar 2011 15:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=Dfc3BF/b8oIKmFIueO3mvC9eyvqZzHaFgXmzOhIE+t0=; b=E+UON0C9/1wMyyALyYoYlsTMW/eUOi51dE8MvUI0ekxY8twg1Czl7a1T4yTvK8TXIg qT4Mnd2xRfWE+Kb3U7MU/OxfWYFXBRbE9hOGAoMQaLAhMON2hCVMh8HXDOHUVD2s2IUq I/mlzptYbkEodBdh3eAGnExDcgdj+22sct2pA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=VyxUmLq9rdo9TIVeDviTejLAcHecCUXNREd2VRWpvw1WPvPzmysNZsao19S5sW+EZ7 7pMbviYXC68Oq67FxDw08RMxXByC02lDEjTzC2AKIq0Jgzy8lXGO6esjaXzwTGJijJ9e Q6ykRLp/lxAMMqXTQonB0ejNLh8JvriL3bCJU= MIME-Version: 1.0 Received: by 10.42.145.71 with SMTP id e7mr3724569icv.314.1299973693368; Sat, 12 Mar 2011 15:48:13 -0800 (PST) Received: by 10.42.148.195 with HTTP; Sat, 12 Mar 2011 15:48:13 -0800 (PST) Date: Sat, 12 Mar 2011 17:48:13 -0600 Message-ID: Subject: [PATCH] wait_for_free_request needs to wait on credits returned by server for SMB2 From: Steve French To: linux-cifs@vger.kernel.org Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 12 Mar 2011 23:48:16 +0000 (UTC) diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 095cec7..73fe746 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -64,6 +64,7 @@ extern char *cifs_compose_mount_options(const char *sb_mountdata, extern struct mid_q_entry *AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server); extern void DeleteMidQEntry(struct mid_q_entry *midEntry); +extern int wait_for_free_request(struct TCP_Server_Info *sv, const int long_op); extern int cifs_call_async(struct TCP_Server_Info *server, struct smb_hdr *in_buf, mid_callback_t *callback, void *cbdata); diff --git a/fs/cifs/smb2proto.h b/fs/cifs/smb2proto.h index bce3cf9..0dd675c 100644 --- a/fs/cifs/smb2proto.h +++ b/fs/cifs/smb2proto.h @@ -189,7 +189,6 @@ extern int new_read_req(struct kvec *iov, struct cifs_tcon *tcon, int request_type); extern int smb2_sendv(struct TCP_Server_Info *server, struct kvec *iov, int n_vec); -extern int wait_for_free_request(struct cifs_ses *ses, const int long_op); extern int smb2_wait_on_complex_mid(struct cifs_ses *ses, struct mid_q_entry *mid, unsigned long timeout, diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 29dd7ed..1a2930d 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -260,7 +260,7 @@ smb_send(struct TCP_Server_Info *server, struct smb_hdr *smb_buffer, return smb_sendv(server, &iov, 1); } -static int wait_for_free_request(struct TCP_Server_Info *server, +int wait_for_free_request(struct TCP_Server_Info *server, const int long_op) {