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:
@@ -102,6 +102,7 @@ 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);
|
||||||
|
if (!inode->i_nlink)
|
||||||
fsnotify_inoderemove(inode);
|
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);
|
||||||
|
Reference in New Issue
Block a user