summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-02-21 19:02:34 +0100
committerJan Kara <jack@suse.cz>2014-02-25 11:17:52 +0100
commit2513190a926f093dbdc301c68e6ade0bcf293f9a (patch)
tree9840dafc6bfd9319537272abf04feb09b430e127 /fs
parent0dc83bd30b0bf5410c0933cfbbf8853248eff0a9 (diff)
downloadlinux-2513190a926f093dbdc301c68e6ade0bcf293f9a.tar.bz2
fsnotify: Fix detection whether overflow event is queued
Currently we didn't initialize event's list head when we removed it from the event list. Thus a detection whether overflow event is already queued wasn't working. Fix it by always initializing the list head when deleting event from a list. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/notify/notification.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index 18b3c4427dca..6bec2f4918f9 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -132,7 +132,11 @@ struct fsnotify_event *fsnotify_remove_notify_event(struct fsnotify_group *group
event = list_first_entry(&group->notification_list,
struct fsnotify_event, list);
- list_del(&event->list);
+ /*
+ * We need to init list head for the case of overflow event so that
+ * check in fsnotify_add_notify_events() works
+ */
+ list_del_init(&event->list);
group->q_len--;
return event;