Skip to contentSkip to conversation

VFS: extra check inside dentry_unhash()

PATCH New Vasily Averin 1 participant 1 message Nov 1, 2006 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VFS: extra check inside dentry_unhash()

From: Vasily Averin <[email protected]>

d_count check after dget() is always true

fs/namei.c renamed from fs/namei.c.duhsh +1 -2
@@ -1993,8 +1993,7 @@ asmlinkage long sys_mkdir(const char __u
 void dentry_unhash(struct dentry *dentry)
 {
 	dget(dentry);
-	if (atomic_read(&dentry->d_count))
-		shrink_dcache_parent(dentry);
+	shrink_dcache_parent(dentry);
 	spin_lock(&dcache_lock);
 	spin_lock(&dentry->d_lock);
 	if (atomic_read(&dentry->d_count) == 2)