summaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorVasily Averin <vvs@sw.ru>2006-12-06 20:37:07 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:35 -0800
commitdc168427e6250a5a24c59f34afed6538092dab42 (patch)
tree647cfff74c45ec42027042666d5212b1c724a350 /fs/namei.c
parent5ac29e62be2a581ec77953eca64d85ddeef488f0 (diff)
[PATCH] VFS: extra check inside dentry_unhash()
d_count check after dget() is always true. Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c3
1 files changed, 1 insertions, 2 deletions
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)