dect
/
linux-2.6
Archived
13
0
Fork 0

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: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Linus Torvalds 2005-09-19 19:54:29 -07:00
parent 875bd5ab01
commit f805fbdaac
1 changed files with 2 additions and 1 deletions

View File

@ -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