aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJohn McCutchan <jmccutchan@novell.com>2005-08-15 12:13:28 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-15 12:50:31 -0400
commit89204c40a03346cd951e698d854105db4cfedc28 (patch)
tree02f52e02f9f11c13c9859217755b043fcf0bbc30 /fs
parent0bf955ce98cb3cf40e20d0cc435299eb76e8819e (diff)
[PATCH] inotify: add MOVE_SELF event
This adds a MOVE_SELF event to inotify. It is sent whenever the inode you are watching is moved. We need this event so that we can catch something like this: - app1: watch /etc/mtab - app2: cp /etc/mtab /tmp/mtab-work mv /etc/mtab /etc/mtab~ mv /tmp/mtab-work /etc/mtab app1 still thinks it's watching /etc/mtab but it's actually watching /etc/mtab~. Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Robert Love <rml@novell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 57046d98a746..b85f158aef0c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2216,7 +2216,8 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
2216 error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); 2216 error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry);
2217 if (!error) { 2217 if (!error) {
2218 const char *new_name = old_dentry->d_name.name; 2218 const char *new_name = old_dentry->d_name.name;
2219 fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode); 2219 fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir,
2220 new_dentry->d_inode, old_dentry->d_inode);
2220 } 2221 }
2221 fsnotify_oldname_free(old_name); 2222 fsnotify_oldname_free(old_name);
2222 2223