diff options
-rw-r--r-- | fs/notify/mark.c | 8 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/fs/notify/mark.c b/fs/notify/mark.c index 3942d5c9eb8d..92e48c70f0f0 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c | |||
@@ -161,7 +161,7 @@ void fsnotify_destroy_mark_locked(struct fsnotify_mark *mark, | |||
161 | mutex_unlock(&group->mark_mutex); | 161 | mutex_unlock(&group->mark_mutex); |
162 | 162 | ||
163 | spin_lock(&destroy_lock); | 163 | spin_lock(&destroy_lock); |
164 | list_add(&mark->destroy_list, &destroy_list); | 164 | list_add(&mark->g_list, &destroy_list); |
165 | spin_unlock(&destroy_lock); | 165 | spin_unlock(&destroy_lock); |
166 | wake_up(&destroy_waitq); | 166 | wake_up(&destroy_waitq); |
167 | /* | 167 | /* |
@@ -370,7 +370,7 @@ err: | |||
370 | spin_unlock(&mark->lock); | 370 | spin_unlock(&mark->lock); |
371 | 371 | ||
372 | spin_lock(&destroy_lock); | 372 | spin_lock(&destroy_lock); |
373 | list_add(&mark->destroy_list, &destroy_list); | 373 | list_add(&mark->g_list, &destroy_list); |
374 | spin_unlock(&destroy_lock); | 374 | spin_unlock(&destroy_lock); |
375 | wake_up(&destroy_waitq); | 375 | wake_up(&destroy_waitq); |
376 | 376 | ||
@@ -469,8 +469,8 @@ static int fsnotify_mark_destroy(void *ignored) | |||
469 | 469 | ||
470 | synchronize_srcu(&fsnotify_mark_srcu); | 470 | synchronize_srcu(&fsnotify_mark_srcu); |
471 | 471 | ||
472 | list_for_each_entry_safe(mark, next, &private_destroy_list, destroy_list) { | 472 | list_for_each_entry_safe(mark, next, &private_destroy_list, g_list) { |
473 | list_del_init(&mark->destroy_list); | 473 | list_del_init(&mark->g_list); |
474 | fsnotify_put_mark(mark); | 474 | fsnotify_put_mark(mark); |
475 | } | 475 | } |
476 | 476 | ||
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 442847a02b8f..0f313f93c586 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -212,7 +212,11 @@ struct fsnotify_mark { | |||
212 | * in kernel that found and may be using this mark. */ | 212 | * in kernel that found and may be using this mark. */ |
213 | atomic_t refcnt; /* active things looking at this mark */ | 213 | atomic_t refcnt; /* active things looking at this mark */ |
214 | struct fsnotify_group *group; /* group this mark is for */ | 214 | struct fsnotify_group *group; /* group this mark is for */ |
215 | struct list_head g_list; /* list of marks by group->i_fsnotify_marks */ | 215 | struct list_head g_list; /* list of marks by group->i_fsnotify_marks |
216 | * Also reused for queueing mark into | ||
217 | * destroy_list when it's waiting for | ||
218 | * the end of SRCU period before it can | ||
219 | * be freed */ | ||
216 | spinlock_t lock; /* protect group and inode */ | 220 | spinlock_t lock; /* protect group and inode */ |
217 | struct hlist_node obj_list; /* list of marks for inode / vfsmount */ | 221 | struct hlist_node obj_list; /* list of marks for inode / vfsmount */ |
218 | struct list_head free_list; /* tmp list used when freeing this mark */ | 222 | struct list_head free_list; /* tmp list used when freeing this mark */ |
@@ -227,7 +231,6 @@ struct fsnotify_mark { | |||
227 | #define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x08 | 231 | #define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x08 |
228 | #define FSNOTIFY_MARK_FLAG_ALIVE 0x10 | 232 | #define FSNOTIFY_MARK_FLAG_ALIVE 0x10 |
229 | unsigned int flags; /* vfsmount or inode mark? */ | 233 | unsigned int flags; /* vfsmount or inode mark? */ |
230 | struct list_head destroy_list; | ||
231 | void (*free_mark)(struct fsnotify_mark *mark); /* called on final put+free */ | 234 | void (*free_mark)(struct fsnotify_mark *mark); /* called on final put+free */ |
232 | }; | 235 | }; |
233 | 236 | ||