OSDN Git Service

Make fsnotify possibly work better for the inode removal case
[uclinux-h8/linux.git] / fs / dcache.c
index 7376b61..fb10386 100644 (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