diff options
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r-- | include/linux/fsnotify.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 11438eff4d44..cc5dec70c32c 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -54,19 +54,20 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
54 | 54 | ||
55 | if (isdir) | 55 | if (isdir) |
56 | isdir = IN_ISDIR; | 56 | isdir = IN_ISDIR; |
57 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name); | 57 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name, |
58 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name); | 58 | source); |
59 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name, | ||
60 | source); | ||
59 | 61 | ||
60 | if (target) { | 62 | if (target) { |
61 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); | 63 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL, NULL); |
62 | inotify_inode_is_dead(target); | 64 | inotify_inode_is_dead(target); |
63 | } | 65 | } |
64 | 66 | ||
65 | if (source) { | 67 | if (source) { |
66 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); | 68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
67 | } | 69 | } |
68 | audit_inode_child(old_name, source, old_dir->i_ino); | 70 | audit_inode_child(new_name, source, new_dir->i_ino); |
69 | audit_inode_child(new_name, target, new_dir->i_ino); | ||
70 | } | 71 | } |
71 | 72 | ||
72 | /* | 73 | /* |
@@ -85,7 +86,7 @@ static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) | |||
85 | */ | 86 | */ |
86 | static inline void fsnotify_inoderemove(struct inode *inode) | 87 | static inline void fsnotify_inoderemove(struct inode *inode) |
87 | { | 88 | { |
88 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); | 89 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL, NULL); |
89 | inotify_inode_is_dead(inode); | 90 | inotify_inode_is_dead(inode); |
90 | } | 91 | } |
91 | 92 | ||
@@ -95,7 +96,8 @@ static inline void fsnotify_inoderemove(struct inode *inode) | |||
95 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | 96 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) |
96 | { | 97 | { |
97 | inode_dir_notify(inode, DN_CREATE); | 98 | inode_dir_notify(inode, DN_CREATE); |
98 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name); | 99 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
100 | dentry->d_inode); | ||
99 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 101 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); |
100 | } | 102 | } |
101 | 103 | ||
@@ -106,7 +108,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
106 | { | 108 | { |
107 | inode_dir_notify(inode, DN_CREATE); | 109 | inode_dir_notify(inode, DN_CREATE); |
108 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, | 110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, |
109 | dentry->d_name.name); | 111 | dentry->d_name.name, dentry->d_inode); |
110 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 112 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); |
111 | } | 113 | } |
112 | 114 | ||
@@ -123,7 +125,7 @@ static inline void fsnotify_access(struct dentry *dentry) | |||
123 | 125 | ||
124 | dnotify_parent(dentry, DN_ACCESS); | 126 | dnotify_parent(dentry, DN_ACCESS); |
125 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 127 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
126 | inotify_inode_queue_event(inode, mask, 0, NULL); | 128 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
127 | } | 129 | } |
128 | 130 | ||
129 | /* | 131 | /* |
@@ -139,7 +141,7 @@ static inline void fsnotify_modify(struct dentry *dentry) | |||
139 | 141 | ||
140 | dnotify_parent(dentry, DN_MODIFY); | 142 | dnotify_parent(dentry, DN_MODIFY); |
141 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 143 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
142 | inotify_inode_queue_event(inode, mask, 0, NULL); | 144 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
143 | } | 145 | } |
144 | 146 | ||
145 | /* | 147 | /* |
@@ -154,7 +156,7 @@ static inline void fsnotify_open(struct dentry *dentry) | |||
154 | mask |= IN_ISDIR; | 156 | mask |= IN_ISDIR; |
155 | 157 | ||
156 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 158 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
157 | inotify_inode_queue_event(inode, mask, 0, NULL); | 159 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
158 | } | 160 | } |
159 | 161 | ||
160 | /* | 162 | /* |
@@ -172,7 +174,7 @@ static inline void fsnotify_close(struct file *file) | |||
172 | mask |= IN_ISDIR; | 174 | mask |= IN_ISDIR; |
173 | 175 | ||
174 | inotify_dentry_parent_queue_event(dentry, mask, 0, name); | 176 | inotify_dentry_parent_queue_event(dentry, mask, 0, name); |
175 | inotify_inode_queue_event(inode, mask, 0, NULL); | 177 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
176 | } | 178 | } |
177 | 179 | ||
178 | /* | 180 | /* |
@@ -187,7 +189,7 @@ static inline void fsnotify_xattr(struct dentry *dentry) | |||
187 | mask |= IN_ISDIR; | 189 | mask |= IN_ISDIR; |
188 | 190 | ||
189 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 191 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
190 | inotify_inode_queue_event(inode, mask, 0, NULL); | 192 | inotify_inode_queue_event(inode, mask, 0, NULL, NULL); |
191 | } | 193 | } |
192 | 194 | ||
193 | /* | 195 | /* |
@@ -234,7 +236,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) | |||
234 | if (in_mask) { | 236 | if (in_mask) { |
235 | if (S_ISDIR(inode->i_mode)) | 237 | if (S_ISDIR(inode->i_mode)) |
236 | in_mask |= IN_ISDIR; | 238 | in_mask |= IN_ISDIR; |
237 | inotify_inode_queue_event(inode, in_mask, 0, NULL); | 239 | inotify_inode_queue_event(inode, in_mask, 0, NULL, NULL); |
238 | inotify_dentry_parent_queue_event(dentry, in_mask, 0, | 240 | inotify_dentry_parent_queue_event(dentry, in_mask, 0, |
239 | dentry->d_name.name); | 241 | dentry->d_name.name); |
240 | } | 242 | } |