Skip to content

Commit

Permalink
Make fsnotify possibly work better for the inode removal case
Browse files Browse the repository at this point in the history
Checking i_nlink is dubious, but the alternatives look even
less appetizing.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Sep 20, 2005
1 parent 875bd5a commit f805fbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/dcache.c
Expand Up @@ -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
Expand Down

0 comments on commit f805fbd

Please sign in to comment.