linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Steve French <sfrench@samba.org>
Cc: Aurelien Aptel <aaptel@suse.com>,
	Samuel Cabrero <scabrero@suse.de>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] cifs: Delete a stray unlock in cifs_swn_reconnect()
Date: Thu, 17 Dec 2020 14:01:48 +0300	[thread overview]
Message-ID: <X9s6nGDLt4xreaYN@mwanda> (raw)

The unlock is done in the caller, this is a stray which leads to a
double unlock bug.

Fixes: bf80e5d4259a ("cifs: Send witness register and unregister commands to userspace daemon")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 fs/cifs/cifs_swn.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cifs/cifs_swn.c b/fs/cifs/cifs_swn.c
index c594e588a8b5..b2ef082d6438 100644
--- a/fs/cifs/cifs_swn.c
+++ b/fs/cifs/cifs_swn.c
@@ -285,8 +285,6 @@ static struct cifs_swn_reg *cifs_find_swn_reg(struct cifs_tcon *tcon)
 			continue;
 		}
 
-		mutex_unlock(&cifs_swnreg_idr_mutex);
-
 		cifs_dbg(FYI, "Existing swn registration for %s:%s found\n", swnreg->net_name,
 				swnreg->share_name);
 
-- 
2.29.2


             reply	other threads:[~2020-12-17 11:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 11:01 Dan Carpenter [this message]
2020-12-17 11:02 ` [PATCH 2/2] cifs: Unlock on errors in cifs_swn_reconnect() Dan Carpenter
2020-12-17 11:42   ` Samuel Cabrero
2020-12-17 11:03 ` [PATCH 3/3] cifs: Re-indent cifs_swn_reconnect() Dan Carpenter
2020-12-17 11:45   ` Samuel Cabrero
2020-12-18  2:38   ` Steve French
2020-12-17 11:40 ` [PATCH 1/3] cifs: Delete a stray unlock in cifs_swn_reconnect() Samuel Cabrero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9s6nGDLt4xreaYN@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=aaptel@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=scabrero@suse.de \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).