Commit f805fbda authored by Linus Torvalds's avatar 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: default avatarLinus Torvalds <torvalds@osdl.org>
parent 875bd5ab
...@@ -102,7 +102,8 @@ static inline void dentry_iput(struct dentry * dentry) ...@@ -102,7 +102,8 @@ static inline void dentry_iput(struct dentry * dentry)
list_del_init(&dentry->d_alias); list_del_init(&dentry->d_alias);
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
fsnotify_inoderemove(inode); if (!inode->i_nlink)
fsnotify_inoderemove(inode);
if (dentry->d_op && dentry->d_op->d_iput) if (dentry->d_op && dentry->d_op->d_iput)
dentry->d_op->d_iput(dentry, inode); dentry->d_op->d_iput(dentry, inode);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment