From: Vasily Averin Date: Thu, 7 Dec 2006 04:37:07 +0000 (-0800) Subject: [PATCH] VFS: extra check inside dentry_unhash() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=dc168427e6250a5a24c59f34afed6538092dab42;p=deliverable%2Flinux.git [PATCH] VFS: extra check inside dentry_unhash() d_count check after dget() is always true. Signed-off-by: Vasily Averin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/namei.c b/fs/namei.c index 61f99c1967d9..db1bca26d88c 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1998,8 +1998,7 @@ asmlinkage long sys_mkdir(const char __user *pathname, int mode) 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)