From patchwork Tue Nov 16 03:05:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 12621383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A26ECC433EF for ; Tue, 16 Nov 2021 05:41:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A20961B6F for ; Tue, 16 Nov 2021 05:41:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235806AbhKPFoO (ORCPT ); Tue, 16 Nov 2021 00:44:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235431AbhKPFoG (ORCPT ); Tue, 16 Nov 2021 00:44:06 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE51C0D943C for ; Mon, 15 Nov 2021 19:05:19 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id k2so32447829lji.4 for ; Mon, 15 Nov 2021 19:05:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=2WrJwGJ4t3DNvO7Ru2mlFYRZm57l4lwyfeq30z2RXgc=; b=hyhutEZyhfipxq/+BHtbqqjeftoTQPjdnXXs9j+dbQxnYmHVXkxkVisx19G3GIC4XT Vy4FNRh6Bgay4zR+siTlD527kE2wGibAaxM0xK5CZk9JQ2OUC2kGLNaT7HQg2MnwSicV WllBHM/Q5VLvzNbBRWzAdajK/NGNchhA8CkopYx/gLfLizHxiIbUoLjbwrpcyHkpY5pz owmn0QHfhx5yQQRA1qZ5t0tWu/0jtTghgw3VAiFdr8WGfq0qvPPYCukgNRtv9HPd4q39 rDGaqgGaZ8krPBhS1pVWS3G8ezPAqOraoOWG57UUn5Waamvv7nrdq1dypGR0PgaJ2ChX GdHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=2WrJwGJ4t3DNvO7Ru2mlFYRZm57l4lwyfeq30z2RXgc=; b=RmZzwCnLZF/Q/LyGcj2PLRmyOQexN/KZK0Qra0c+aDV8Z4PS6YV+Nbswdka/nlIOjF lm6Tl41eoUnj0gKjGeSNcyY/ZSAjDBydiMsvRE/kng57wuvMvk5ocgk3jXVj76yoPEG2 p33KqiRoAAZ32Jwdr9Nv70BzpRLVFsXvYAYiR3HNkPC1KZ7WcHZQKPFqBjoZmpApFKS9 UDr0daIVU2wX5vA5tTMripJtzCLnoUgkf83b1GWOscoTSfaoTrR1Y4V0QLL78b/v78T9 JgXXbQHXBfWE9ZhCAcLFIcSF7CrDyrTusbuMW5B3boNvKLxBt9WE6LSuj20uXj6dr53u TjhA== X-Gm-Message-State: AOAM530fo6f6ynQsFrYg6Fde5LjkbgJFsrcM8VIlfU4Yxoo+aS8+Z4br frVm5HpEGVjVMo2Y/BZVPMsZFG28JY5ciHDlCvNJXzwY X-Google-Smtp-Source: ABdhPJy74la1V+TUt8Br7j5BW0NeOsCaFM6JlBdZtEdywC9u1FNpzPp2uWGXgofu9KvWHaliAFAE3Gmb9H6cTygSGRo= X-Received: by 2002:a2e:7c16:: with SMTP id x22mr3661023ljc.460.1637031917888; Mon, 15 Nov 2021 19:05:17 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Mon, 15 Nov 2021 21:05:06 -0600 Message-ID: Subject: [PATCH] trivial coverity cleanup from multichannel series To: CIFS Cc: Shyam Prasad N , Paulo Alcantara Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Coverity complains about printks inside of spinlocks - move the cifs_debug print call in cifs_try_adding_channels outside of the spinlock. See attached patch. c Reviewed-by: Paulo Alcantara (SUSE) From 95305b4141ece91e77691860b70cdf4d28537a7f Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 15 Nov 2021 21:00:08 -0600 Subject: [PATCH] cifs: move debug print out of spinlock It is better to print debug messages outside of the chan_lock spinlock where possible. CC: Shyam Prasad N Addresses-Coverity: 1493854 ("Thread deadlock") Signed-off-by: Steve French --- fs/cifs/sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 2c10b186ed6e..7db8b22edac9 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -95,9 +95,9 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses) } if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) { - cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname); ses->chan_max = 1; spin_unlock(&ses->chan_lock); + cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname); return 0; } spin_unlock(&ses->chan_lock); -- 2.32.0