aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/notify/fsnotify.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 2169aa593d5f..36802420d69a 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -225,7 +225,6 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
225 struct fsnotify_event *event = NULL; 225 struct fsnotify_event *event = NULL;
226 struct vfsmount *mnt; 226 struct vfsmount *mnt;
227 int idx, ret = 0; 227 int idx, ret = 0;
228 bool used_inode, used_vfsmount;
229 /* global tests shouldn't care about events on child only the specific event */ 228 /* global tests shouldn't care about events on child only the specific event */
230 __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD); 229 __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD);
231 230
@@ -260,7 +259,6 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
260 } 259 }
261 260
262 while (inode_node || vfsmount_node) { 261 while (inode_node || vfsmount_node) {
263 used_inode = used_vfsmount = false;
264 inode_group = vfsmount_group = NULL; 262 inode_group = vfsmount_group = NULL;
265 263
266 if (inode_node) { 264 if (inode_node) {
@@ -279,23 +277,22 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
279 /* handle inode */ 277 /* handle inode */
280 send_to_group(to_tell, NULL, inode_mark, NULL, mask, data, 278 send_to_group(to_tell, NULL, inode_mark, NULL, mask, data,
281 data_is, cookie, file_name, &event); 279 data_is, cookie, file_name, &event);
282 used_inode = true; 280 /* we didn't use the vfsmount_mark */
281 vfsmount_group = NULL;
283 } else if (vfsmount_group > inode_group) { 282 } else if (vfsmount_group > inode_group) {
284 send_to_group(to_tell, mnt, NULL, vfsmount_mark, mask, data, 283 send_to_group(to_tell, mnt, NULL, vfsmount_mark, mask, data,
285 data_is, cookie, file_name, &event); 284 data_is, cookie, file_name, &event);
286 used_vfsmount = true; 285 inode_group = NULL;
287 } else { 286 } else {
288 send_to_group(to_tell, mnt, inode_mark, vfsmount_mark, 287 send_to_group(to_tell, mnt, inode_mark, vfsmount_mark,
289 mask, data, data_is, cookie, file_name, 288 mask, data, data_is, cookie, file_name,
290 &event); 289 &event);
291 used_vfsmount = true;
292 used_inode = true;
293 } 290 }
294 291
295 if (used_inode) 292 if (inode_group)
296 inode_node = srcu_dereference(inode_node->next, 293 inode_node = srcu_dereference(inode_node->next,
297 &fsnotify_mark_srcu); 294 &fsnotify_mark_srcu);
298 if (used_vfsmount) 295 if (vfsmount_group)
299 vfsmount_node = srcu_dereference(vfsmount_node->next, 296 vfsmount_node = srcu_dereference(vfsmount_node->next,
300 &fsnotify_mark_srcu); 297 &fsnotify_mark_srcu);
301 } 298 }