X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fdcache.c;h=a15a2e1f55208882ec828339943894928a651bc0;hb=d86c390ffbf5746df9a3cc2c5f7b75d27704580f;hp=3aa8a7e980d80877cff19138ce37b4a01fd2c09a;hpb=67394f8f069c2fdf90f3b6d851824c07815442af;p=~andy%2Flinux diff --git a/fs/dcache.c b/fs/dcache.c index 3aa8a7e980d..a15a2e1f552 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -101,6 +102,7 @@ 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 (dentry->d_op && dentry->d_op->d_iput) dentry->d_op->d_iput(dentry, inode); else @@ -1165,13 +1167,16 @@ out: void d_delete(struct dentry * dentry) { + int isdir = 0; /* * Are we the only user? */ spin_lock(&dcache_lock); spin_lock(&dentry->d_lock); + isdir = S_ISDIR(dentry->d_inode->i_mode); if (atomic_read(&dentry->d_count) == 1) { dentry_iput(dentry); + fsnotify_nameremove(dentry, isdir); return; } @@ -1180,6 +1185,8 @@ void d_delete(struct dentry * dentry) spin_unlock(&dentry->d_lock); spin_unlock(&dcache_lock); + + fsnotify_nameremove(dentry, isdir); } static void __d_rehash(struct dentry * entry, struct hlist_head *list)