提交 f805fbda 编写于 作者: L Linus Torvalds

Make fsnotify possibly work better for the inode removal case

Checking i_nlink is dubious, but the alternatives look even
less appetizing.
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 875bd5ab
......@@ -102,7 +102,8 @@ static inline void dentry_iput(struct dentry * dentry)
list_del_init(&dentry->d_alias);
spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
fsnotify_inoderemove(inode);
if (!inode->i_nlink)
fsnotify_inoderemove(inode);
if (dentry->d_op && dentry->d_op->d_iput)
dentry->d_op->d_iput(dentry, inode);
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册