From patchwork Wed Aug 3 19:12:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 1032292 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p73JCUrW009680 for ; Wed, 3 Aug 2011 19:12:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755363Ab1HCTM3 (ORCPT ); Wed, 3 Aug 2011 15:12:29 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:44364 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754568Ab1HCTM3 (ORCPT ); Wed, 3 Aug 2011 15:12:29 -0400 Received: by fxh19 with SMTP id 19so949724fxh.19 for ; Wed, 03 Aug 2011 12:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=eVy4C1EUzoaa8mlJzU7XFal+UbDFQzgkN8Lx8q/aLk0=; b=PX7/EDCao/JBol+hEbdHiqDyl1c9Y8fu3BJPVcf2yuli6sLWwynQxKlHv53pWvh7q2 br957OEHQjs9JXjvr/o5TLDu8QG38O2LJ53fAohFksX1TZ3xAIj8QCMkp065KLeWSdQP Yr+wSkcdAZqIC59WWZocUh1tLdPt0UUnrQKI4= Received: by 10.204.146.142 with SMTP id h14mr2435397bkv.31.1312398748098; Wed, 03 Aug 2011 12:12:28 -0700 (PDT) Received: from localhost.localdomain ([79.126.105.92]) by mx.google.com with ESMTPS id s14sm321803bkw.52.2011.08.03.12.12.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Aug 2011 12:12:27 -0700 (PDT) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Cc: stable@kernel.org Subject: [PATCH] CIFS: Fix missing a decrement of inFlight value Date: Wed, 3 Aug 2011 23:12:18 +0400 Message-Id: <1312398738-14346-1-git-send-email-piastryyy@gmail.com> X-Mailer: git-send-email 1.7.1 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 (demeter2.kernel.org [140.211.167.43]); Wed, 03 Aug 2011 19:12:30 +0000 (UTC) if we failed on getting mid entry in cifs_call_async. Cc: stable@kernel.org Signed-off-by: Pavel Shilovsky Reviewed-by: Jeff Layton --- fs/cifs/transport.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 147aa22..c1b9c4b 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -362,6 +362,8 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, mid = AllocMidQEntry(hdr, server); if (mid == NULL) { mutex_unlock(&server->srv_mutex); + atomic_dec(&server->inFlight); + wake_up(&server->request_q); return -ENOMEM; }