From patchwork Fri Feb 1 20:03:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10793657 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 74B1814E1 for ; Fri, 1 Feb 2019 20:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6691232C9E for ; Fri, 1 Feb 2019 20:04:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B609330BE; Fri, 1 Feb 2019 20:04:32 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 14ED532C9E for ; Fri, 1 Feb 2019 20:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730629AbfBAUEb (ORCPT ); Fri, 1 Feb 2019 15:04:31 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35455 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730654AbfBAUEb (ORCPT ); Fri, 1 Feb 2019 15:04:31 -0500 Received: by mail-pf1-f195.google.com with SMTP id z9so3752869pfi.2 for ; Fri, 01 Feb 2019 12:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=z2Asmfk1i1HKhQRpKVf9MkV5Q+e9KRD8JP1YcEc3jPg=; b=qBMLoL5J37Q3QeeFhe2OznS1hQFxjQnlgPe9jMH2fUGp3CAwf+aRGzUYuFGB2l/igS /e8qGoxWhm9BhON3COsajgVGuV4CvfWanXgapWPO9BVXjLdxG56UMdmSPsXSaSon/XeN R/GTrfKw19Uiw+oHDqeYaHKXP/VQR//dR76xhAeuq3an4MqJ3ucgCN9a16jftwjmEVxn yPciCbqr2Emu6F4n0vNjG0Hwe9zS+YEauSc+PLEjf7eWAdePeBZ9lEilPR6VX6RxD5s1 5hcOf2pF1U/ZvDX2FDdUVXbKVlZCG7FwXVa+u9Q4bVGvNPjyvMuNdwqBuPa6MO1Jykf2 oyxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=z2Asmfk1i1HKhQRpKVf9MkV5Q+e9KRD8JP1YcEc3jPg=; b=ulOaV5snKoAhZhIw058mQ0118omtcvcanr5+WhJ8D5DwC1G1MiIMJM9mN6xNnGbUoQ ZiZno2o54B/qDHJBYuLfxiPjw4PjJN6NwM7KmCXap0+W0tSyAjj/noB1LehV3rw5njSr 6D26n+ojcqAJUCc25Hjrm1zgCn1wMHJnaCiWUhSnBnA4ITet8DZziiJlTJrbFZfd9XSf 7FK2zUwrg+cAmV24tMnHZQRyzsOHn+czuV2WHrymLa9gNxuH8Qzb3Hc5OaXKvLK/wotj cudo0rhCHqgZ3aJoj8qLxRXtvTL4O7CcI0PLUk+JWZ1kjep/wiw6nckJLif0PBVx/dM5 Fd4A== X-Gm-Message-State: AJcUukeGCfMEtuXxPhBHFMfofAtgVfj26b6OWtQgGvMVjTjhxq/WwmY8 7SiCthHtN61syA76vWeElG9iRd8= X-Google-Smtp-Source: ALg8bN7Rew1dCUbe/yoL/LD7xJ84m60KC9wTn9S1IGJM50Jzv+6GdRhzPM0KePWrugwk9LIr3cIFcw== X-Received: by 2002:a63:e615:: with SMTP id g21mr37496664pgh.290.1549051470450; Fri, 01 Feb 2019 12:04:30 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:0:a18e:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id x11sm24247451pfe.72.2019.02.01.12.04.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Feb 2019 12:04:29 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH 07/23] CIFS: Do not log credits when unmounting a share Date: Fri, 1 Feb 2019 12:03:55 -0800 Message-Id: <1549051452-5968-8-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549051452-5968-1-git-send-email-pshilov@microsoft.com> References: <1549051452-5968-1-git-send-email-pshilov@microsoft.com> 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 Currently we only skip credits logging on reconnects. When unmounting a share the number of credits on the client doesn't matter, so skip logging in such cases too. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French --- fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 6f96e22..49667ae 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -102,7 +102,8 @@ smb2_add_credits(struct TCP_Server_Info *server, const unsigned int add, spin_unlock(&server->req_lock); wake_up(&server->request_q); - if (server->tcpStatus == CifsNeedReconnect) + if (server->tcpStatus == CifsNeedReconnect + || server->tcpStatus == CifsExiting) return; switch (rc) {