summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorJohn McCutchan <ttb@tentacle.dhs.org>2005-08-08 13:52:16 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-08 11:53:47 -0700
commit7a91bf7f5c22c8407a9991cbd9ce5bb87caa6b4a (patch)
treeffd77cfbf621a990052c1277d8a18451b9363dda /fs/namei.c
parent1963c907b21e140082d081b1c8f8c2154593c7d7 (diff)
downloadlinux-7a91bf7f5c22c8407a9991cbd9ce5bb87caa6b4a.tar.bz2
[PATCH] fsnotify_name/inoderemove
The patch below unhooks fsnotify from vfs_unlink & vfs_rmdir. It introduces two new fsnotify calls, that are hooked in at the dcache level. This not only more closely matches how the VFS layer works, it also avoids the problem with locking and inode lifetimes. The two functions are - fsnotify_nameremove -- called when a directory entry is going away. It notifies the PARENT of the deletion. This is called from d_delete(). - inoderemove -- called when the files inode itself is going away. It notifies the inode that is being deleted. This is called from dentry_iput(). Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 32accb6a672f..57046d98a746 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1802,7 +1802,6 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
up(&dentry->d_inode->i_sem);
if (!error) {
d_delete(dentry);
- fsnotify_rmdir(dentry, dentry->d_inode, dir);
}
dput(dentry);
@@ -1874,9 +1873,7 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
/* We don't d_delete() NFS sillyrenamed files--they still exist. */
if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
- struct inode *inode = dentry->d_inode;
d_delete(dentry);
- fsnotify_unlink(dentry, inode, dir);
}
return error;