aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/notify/mark.c10
-rw-r--r--include/linux/fsnotify_backend.h1
2 files changed, 2 insertions, 9 deletions
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index f9dda0304a10..0e93d90bb753 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -299,22 +299,16 @@ void fsnotify_clear_marks_by_group_flags(struct fsnotify_group *group,
299 unsigned int flags) 299 unsigned int flags)
300{ 300{
301 struct fsnotify_mark *lmark, *mark; 301 struct fsnotify_mark *lmark, *mark;
302 LIST_HEAD(free_list);
303 302
304 mutex_lock(&group->mark_mutex); 303 mutex_lock(&group->mark_mutex);
305 list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) { 304 list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) {
306 if (mark->flags & flags) { 305 if (mark->flags & flags) {
307 list_add(&mark->free_g_list, &free_list);
308 list_del_init(&mark->g_list);
309 fsnotify_get_mark(mark); 306 fsnotify_get_mark(mark);
307 fsnotify_destroy_mark_locked(mark, group);
308 fsnotify_put_mark(mark);
310 } 309 }
311 } 310 }
312 mutex_unlock(&group->mark_mutex); 311 mutex_unlock(&group->mark_mutex);
313
314 list_for_each_entry_safe(mark, lmark, &free_list, free_g_list) {
315 fsnotify_destroy_mark(mark, group);
316 fsnotify_put_mark(mark);
317 }
318} 312}
319 313
320/* 314/*
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 26c06afa264e..5a8899350456 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -287,7 +287,6 @@ struct fsnotify_mark {
287 struct fsnotify_inode_mark i; 287 struct fsnotify_inode_mark i;
288 struct fsnotify_vfsmount_mark m; 288 struct fsnotify_vfsmount_mark m;
289 }; 289 };
290 struct list_head free_g_list; /* tmp list used when freeing this mark */
291 __u32 ignored_mask; /* events types to ignore */ 290 __u32 ignored_mask; /* events types to ignore */
292#define FSNOTIFY_MARK_FLAG_INODE 0x01 291#define FSNOTIFY_MARK_FLAG_INODE 0x01
293#define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02 292#define FSNOTIFY_MARK_FLAG_VFSMOUNT 0x02