aboutsummaryrefslogtreecommitdiffstats
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 14:53:47 -0400
commit7a91bf7f5c22c8407a9991cbd9ce5bb87caa6b4a (patch)
treeffd77cfbf621a990052c1277d8a18451b9363dda /fs/namei.c
parent1963c907b21e140082d081b1c8f8c2154593c7d7 (diff)
[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)
1802 up(&dentry->d_inode->i_sem); 1802 up(&dentry->d_inode->i_sem);
1803 if (!error) { 1803 if (!error) {
1804 d_delete(dentry); 1804 d_delete(dentry);
1805 fsnotify_rmdir(dentry, dentry->d_inode, dir);
1806 } 1805 }
1807 dput(dentry); 1806 dput(dentry);
1808 1807
@@ -1874,9 +1873,7 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
1874 1873
1875 /* We don't d_delete() NFS sillyrenamed files--they still exist. */ 1874 /* We don't d_delete() NFS sillyrenamed files--they still exist. */
1876 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) { 1875 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
1877 struct inode *inode = dentry->d_inode;
1878 d_delete(dentry); 1876 d_delete(dentry);
1879 fsnotify_unlink(dentry, inode, dir);
1880 } 1877 }
1881 1878
1882 return error; 1879 return error;