diff options
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r-- | include/linux/fsnotify.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index e96a4306ab3b..03b8e7932b83 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -21,7 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | 22 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, |
23 | const char *old_name, const char *new_name, | 23 | const char *old_name, const char *new_name, |
24 | int isdir, struct inode *target) | 24 | int isdir, struct inode *target, struct inode *source) |
25 | { | 25 | { |
26 | u32 cookie = inotify_get_cookie(); | 26 | u32 cookie = inotify_get_cookie(); |
27 | 27 | ||
@@ -41,31 +41,29 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
41 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); | 41 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); |
42 | inotify_inode_is_dead(target); | 42 | inotify_inode_is_dead(target); |
43 | } | 43 | } |
44 | |||
45 | if (source) { | ||
46 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); | ||
47 | } | ||
44 | } | 48 | } |
45 | 49 | ||
46 | /* | 50 | /* |
47 | * fsnotify_unlink - file was unlinked | 51 | * fsnotify_nameremove - a filename was removed from a directory |
48 | */ | 52 | */ |
49 | static inline void fsnotify_unlink(struct dentry *dentry, struct inode *dir) | 53 | static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) |
50 | { | 54 | { |
51 | struct inode *inode = dentry->d_inode; | 55 | if (isdir) |
52 | 56 | isdir = IN_ISDIR; | |
53 | inode_dir_notify(dir, DN_DELETE); | 57 | dnotify_parent(dentry, DN_DELETE); |
54 | inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name); | 58 | inotify_dentry_parent_queue_event(dentry, IN_DELETE|isdir, 0, dentry->d_name.name); |
55 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); | ||
56 | |||
57 | inotify_inode_is_dead(inode); | ||
58 | } | 59 | } |
59 | 60 | ||
60 | /* | 61 | /* |
61 | * fsnotify_rmdir - directory was removed | 62 | * fsnotify_inoderemove - an inode is going away |
62 | */ | 63 | */ |
63 | static inline void fsnotify_rmdir(struct dentry *dentry, struct inode *inode, | 64 | static inline void fsnotify_inoderemove(struct inode *inode) |
64 | struct inode *dir) | ||
65 | { | 65 | { |
66 | inode_dir_notify(dir, DN_DELETE); | 66 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); |
67 | inotify_inode_queue_event(dir,IN_DELETE|IN_ISDIR,0,dentry->d_name.name); | ||
68 | inotify_inode_queue_event(inode, IN_DELETE_SELF | IN_ISDIR, 0, NULL); | ||
69 | inotify_inode_is_dead(inode); | 67 | inotify_inode_is_dead(inode); |
70 | } | 68 | } |
71 | 69 | ||