Commit 75fb13cd authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] d_vfs_flags locking fix

Be consistent about d_vfs_flags locking: take dentry->d_lock when modifying
it.
parent 87ada13e
...@@ -1120,7 +1120,9 @@ void d_rehash(struct dentry * entry) ...@@ -1120,7 +1120,9 @@ void d_rehash(struct dentry * entry)
{ {
struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash); struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
spin_lock(&dcache_lock); spin_lock(&dcache_lock);
spin_lock(&entry->d_lock);
entry->d_vfs_flags &= ~DCACHE_UNHASHED; entry->d_vfs_flags &= ~DCACHE_UNHASHED;
spin_unlock(&entry->d_lock);
entry->d_bucket = list; entry->d_bucket = list;
hlist_add_head_rcu(&entry->d_hash, list); hlist_add_head_rcu(&entry->d_hash, list);
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
......
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