Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5548
b: refs/heads/master
c: 7544953
h: refs/heads/master
v: v3
  • Loading branch information
John McCutchan authored and Linus Torvalds committed Aug 1, 2005
1 parent a9b4bee commit 4e63d4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be2ac68f7b66e90b8d25c168fc4d033b034f5c43
refs/heads/master: 7544953685859875b5ac0260b6b1856066c092d6
2 changes: 1 addition & 1 deletion trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry);
if (!error) {
const char *new_name = old_dentry->d_name.name;
fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir);
fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode);
}
fsnotify_oldname_free(old_name);

Expand Down
7 changes: 6 additions & 1 deletion trunk/include/linux/fsnotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
const char *old_name, const char *new_name,
int isdir)
int isdir, struct inode *target)
{
u32 cookie = inotify_get_cookie();

Expand All @@ -36,6 +36,11 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
isdir = IN_ISDIR;
inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name);
inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name);

if (target) {
inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL);
inotify_inode_is_dead(target);
}
}

/*
Expand Down

0 comments on commit 4e63d4d

Please sign in to comment.