]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/notify/fsnotify.c
fsnotify: reset used_inode and used_vfsmount on each pass
[net-next-2.6.git] / fs / notify / fsnotify.c
index f3e3b355ba7fd1be9ce8f02ce053516ac904ab93..59dc7a02bd0cc2534008650d8e131675d99e0dd6 100644 (file)
@@ -220,7 +220,7 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
        struct fsnotify_event *event = NULL;
        struct vfsmount *mnt;
        int idx, ret = 0;
-       bool used_inode = false, used_vfsmount = false;
+       bool used_inode, used_vfsmount;
        /* global tests shouldn't care about events on child only the specific event */
        __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD);
 
@@ -261,6 +261,8 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
        }
 
        while (inode_node || vfsmount_node) {
+               used_inode = used_vfsmount = false;
+
                if (inode_node) {
                        inode_mark = hlist_entry(srcu_dereference(inode_node, &fsnotify_mark_srcu),
                                                 struct fsnotify_mark, i.i_list);