Be consistent about d_vfs_flags locking: take dentry->d_lock when modifying
it.


---

 25-akpm/fs/dcache.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN fs/dcache.c~d_vfs_flags-locking-fix fs/dcache.c
--- 25/fs/dcache.c~d_vfs_flags-locking-fix	2004-05-08 03:46:30.663826616 -0700
+++ 25-akpm/fs/dcache.c	2004-05-08 03:47:00.675264184 -0700
@@ -1120,7 +1120,9 @@ void d_rehash(struct dentry * entry)
 {
 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
 	spin_lock(&dcache_lock);
+	spin_lock(&entry->d_lock);
  	entry->d_vfs_flags &= ~DCACHE_UNHASHED;
+	spin_unlock(&entry->d_lock);
 	entry->d_bucket = list;
  	hlist_add_head_rcu(&entry->d_hash, list);
 	spin_unlock(&dcache_lock);

_