提交 dc168427 编写于 作者: V Vasily Averin 提交者: Linus Torvalds

[PATCH] VFS: extra check inside dentry_unhash()

d_count check after dget() is always true.
Signed-off-by: NVasily Averin <vvs@sw.ru>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 5ac29e62
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册