* [PATCH] NFS: Fix missing unlock in nfs_unlink()
@ 2022-08-12 1:14 Sun Ke
2022-08-16 1:06 ` Sun Ke
0 siblings, 1 reply; 4+ messages in thread
From: Sun Ke @ 2022-08-12 1:14 UTC (permalink / raw)
To: trond.myklebust, anna; +Cc: linux-nfs, kernel-janitors, sunke32
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);
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] NFS: Fix missing unlock in nfs_unlink()
2022-08-12 1:14 [PATCH] NFS: Fix missing unlock in nfs_unlink() Sun Ke
@ 2022-08-16 1:06 ` Sun Ke
2022-08-16 8:28 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Sun Ke @ 2022-08-16 1:06 UTC (permalink / raw)
To: trond.myklebust, anna; +Cc: linux-nfs, kernel-janitors, neilb
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);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] NFS: Fix missing unlock in nfs_unlink()
2022-08-16 1:06 ` Sun Ke
@ 2022-08-16 8:28 ` Dan Carpenter
2022-08-17 1:50 ` Sun Ke
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2022-08-16 8:28 UTC (permalink / raw)
To: Sun Ke; +Cc: trond.myklebust, anna, linux-nfs, kernel-janitors, neilb
On Tue, Aug 16, 2022 at 09:06:06AM +0800, Sun Ke wrote:
> friendly ping...
>
> 在 2022/8/12 9:14, Sun Ke 写道:
> > Add the missing unlock before goto.
The patch is correct, but please wait at least two weeks before sending
reminders. Longer than two weeks if the merge window is open.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] NFS: Fix missing unlock in nfs_unlink()
2022-08-16 8:28 ` Dan Carpenter
@ 2022-08-17 1:50 ` Sun Ke
0 siblings, 0 replies; 4+ messages in thread
From: Sun Ke @ 2022-08-17 1:50 UTC (permalink / raw)
To: Dan Carpenter; +Cc: trond.myklebust, anna, linux-nfs, kernel-janitors, neilb
在 2022/8/16 16:28, Dan Carpenter 写道:
> On Tue, Aug 16, 2022 at 09:06:06AM +0800, Sun Ke wrote:
>> friendly ping...
>>
>> 在 2022/8/12 9:14, Sun Ke 写道:
>>> Add the missing unlock before goto.
>
>
> The patch is correct, but please wait at least two weeks before sending
> reminders. Longer than two weeks if the merge window is open.
Sorry for that, two weeks, got it. By the way, I find the patch have
merged to next.
Thanks.
Sun Ke
>
> regards,
> dan carpenter
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-17 1:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-12 1:14 [PATCH] NFS: Fix missing unlock in nfs_unlink() Sun Ke
2022-08-16 1:06 ` Sun Ke
2022-08-16 8:28 ` Dan Carpenter
2022-08-17 1:50 ` Sun Ke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox