summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorVasily Averin <vvs@sw.ru>2006-12-07 05:37:07 +0100
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 17:39:35 +0100
commitdc168427e6250a5a24c59f34afed6538092dab42 (patch)
tree647cfff74c45ec42027042666d5212b1c724a350 /fs
parent[PATCH] drivers/cdrom/*: trivial vsnprintf() conversion (diff)
downloadlinux-dc168427e6250a5a24c59f34afed6538092dab42.tar.xz
linux-dc168427e6250a5a24c59f34afed6538092dab42.zip
[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')
-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)