Commit 201be7ab authored by Linus Torvalds's avatar Linus Torvalds

Fix __d_drop() to properly initialize the d_hash fields,

so that __d_drop() can safely be done multiple times on
a dentry without corrupting other hash entries.

Noticed by Trond Myklebust.
parent b29a28a0
......@@ -175,7 +175,7 @@ extern spinlock_t dcache_lock;
static inline void __d_drop(struct dentry *dentry)
{
dentry->d_vfs_flags |= DCACHE_UNHASHED;
hlist_del_rcu(&dentry->d_hash);
hlist_del_rcu_init(&dentry->d_hash);
}
static inline void d_drop(struct dentry *dentry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment