summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-16 14:51:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-16 14:51:16 +0300
commit8a7a1920d72c87692665de214fdc5dc37e34e5cb (patch)
tree234d7e730dde2a734322439f0400df7f2ee22201 /fs/9p
parentaaecd681f60fa02c7697198b308336a13b231f30 (diff)
parent380df7b7938d3c3ba1d0d0b472a810fd38061329 (diff)
downloadlinux-8a7a1920d72c87692665de214fdc5dc37e34e5cb.tar.xz
Merge v6.9.5
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_dentry.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index f16f73581634..01338d4c2d9e 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -48,12 +48,17 @@ static int v9fs_cached_dentry_delete(const struct dentry *dentry)
static void v9fs_dentry_release(struct dentry *dentry)
{
struct hlist_node *p, *n;
+ struct hlist_head head;
p9_debug(P9_DEBUG_VFS, " dentry: %pd (%p)\n",
dentry, dentry);
- hlist_for_each_safe(p, n, (struct hlist_head *)&dentry->d_fsdata)
+
+ spin_lock(&dentry->d_lock);
+ hlist_move_list((struct hlist_head *)&dentry->d_fsdata, &head);
+ spin_unlock(&dentry->d_lock);
+
+ hlist_for_each_safe(p, n, &head)
p9_fid_put(hlist_entry(p, struct p9_fid, dlist));
- dentry->d_fsdata = NULL;
}
static int v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)