Linux NFS development
 help / color / mirror / Atom feed
From: Sun Ke <sunke32@huawei.com>
To: <trond.myklebust@hammerspace.com>, <anna@kernel.org>
Cc: <linux-nfs@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	<neilb@suse.de>
Subject: Re: [PATCH] NFS: Fix missing unlock in nfs_unlink()
Date: Tue, 16 Aug 2022 09:06:06 +0800	[thread overview]
Message-ID: <5e947976-0808-1d32-e170-d85ef73972e7@huawei.com> (raw)
In-Reply-To: <20220812011440.3602849-1-sunke32@huawei.com>

friendly ping...

在 2022/8/12 9:14, Sun Ke 写道:
> Add the missing unlock before goto.
> 
> Fixes: 3c59366c207e ("NFS: don't unhash dentry during unlink/rename")
> Signed-off-by: Sun Ke <sunke32@huawei.com>
> ---
>   fs/nfs/dir.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index dbab3caa15ed..1b879584d4fe 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -2484,8 +2484,10 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
>   	 */
>   	error = -ETXTBSY;
>   	if (WARN_ON(dentry->d_flags & DCACHE_NFSFS_RENAMED) ||
> -	    WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED))
> +	    WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED)) {
> +		spin_unlock(&dentry->d_lock);
>   		goto out;
> +	}
>   	if (dentry->d_fsdata)
>   		/* old devname */
>   		kfree(dentry->d_fsdata);
> 

  reply	other threads:[~2022-08-16  4:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  1:14 [PATCH] NFS: Fix missing unlock in nfs_unlink() Sun Ke
2022-08-16  1:06 ` Sun Ke [this message]
2022-08-16  8:28   ` Dan Carpenter
2022-08-17  1:50     ` Sun Ke

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=5e947976-0808-1d32-e170-d85ef73972e7@huawei.com \
    --to=sunke32@huawei.com \
    --cc=anna@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trond.myklebust@hammerspace.com \
    /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