note that in the second (RENAME_EXCHANGE) call of fsnotify_move() in vfs_rename() the old_dentry->d_name is guaranteed to be unchanged throughout the evaluation of fsnotify_move() (by the fact that the parent directory is locked exclusive), so we don't need to fetch old_dentry->d_name.name in the caller.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -102,7 +102,7 @@ static inline void fsnotify_link_count(struct inode *inode) · 101 unmodified lines | ||
| 102 | 102 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir |
| 103 | 103 | */ |
| 104 | 104 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, |
| 105 | − const unsigned char *old_name, | |
| 105 | + const struct qstr *old_name, | |
| 106 | 106 | int isdir, struct inode *target, |
| 107 | 107 | struct dentry *moved) |
| 108 | 108 | { |
| @@ -122,7 +122,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, · 13 unmodified lines | ||
| 122 | 122 | mask |= FS_ISDIR; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | − fsnotify(old_dir, old_dir_mask, source, FSNOTIFY_EVENT_INODE, old_name, | |
| 125 | + fsnotify(old_dir, old_dir_mask, source, FSNOTIFY_EVENT_INODE, old_name->name, | |
| 126 | 126 | fs_cookie); |
| 127 | 127 | fsnotify(new_dir, new_dir_mask, source, FSNOTIFY_EVENT_INODE, new_name, |
| 128 | 128 | fs_cookie); |