提交 2513190a 编写于 作者: J Jan Kara

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: NJan Kara <jack@suse.cz>
上级 0dc83bd3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册