Merge tag '9p-for-6.10-rc2' of https://github.com/martinetd/linux
Merge commit. Changes below are compared with the first parent: db163660.
Changes
2 files changed · +9 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| fs/9p/vfs_dentry.c | modified | +7 | −2 | View file |
| net/9p/client.c | modified | +2 | −0 | View file |
fs/9p/vfs_dentry.c
View filediff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index f16f735..01338d4 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)
net/9p/client.c
View filediff --git a/net/9p/client.c b/net/9p/client.c
index 0077465..5cd9472 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -236,6 +236,8 @@ static int p9_fcall_init(struct p9_client *c, struct p9_fcall *fc,
if (!fc->sdata)
return -ENOMEM;
fc->capacity = alloc_msize;
+ fc->id = 0;
+ fc->tag = P9_NOTAG;
return 0;
}