From: Vasily Averin Date: Thu, 7 Dec 2006 04:37:07 +0000 (-0800) Subject: [PATCH] VFS: extra check inside dentry_unhash() X-Git-Tag: v2.6.20-rc1~145^2^2~176 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dc168427e6250a5a24c59f34afed6538092dab42;p=linux-2.6-omap-h63xx.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 61f99c1967d..db1bca26d88 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)