diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-16 14:51:16 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-16 14:51:16 +0300 |
commit | 8a7a1920d72c87692665de214fdc5dc37e34e5cb (patch) | |
tree | 234d7e730dde2a734322439f0400df7f2ee22201 /fs/9p | |
parent | aaecd681f60fa02c7697198b308336a13b231f30 (diff) | |
parent | 380df7b7938d3c3ba1d0d0b472a810fd38061329 (diff) | |
download | linux-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.c | 9 |
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) |