/* The structure that describe the interested events and the source fd */
struct epoll_event event;
-
- /* The fllink is in use. Since rcu can't do 'list_del_init()' */
- int on_list;
};
/*
/* Remove the current item from the list of epoll hooks */
spin_lock(&file->f_lock);
- if (epi->on_list) {
- list_del_rcu(&epi->fllink);
- epi->on_list = 0;
- }
+ list_del_rcu(&epi->fllink);
spin_unlock(&file->f_lock);
rb_erase(&epi->rbn, &ep->rbr);
epi->event = *event;
epi->nwait = 0;
epi->next = EP_UNACTIVE_PTR;
- epi->on_list = 0;
if (epi->event.events & EPOLLWAKEUP) {
error = ep_create_wakeup_source(epi);
if (error)
/* Add the current item to the list of active epoll hook for this file */
spin_lock(&tfile->f_lock);
list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links);
- epi->on_list = 1;
spin_unlock(&tfile->f_lock);
/*
error_remove_epi:
spin_lock(&tfile->f_lock);
- if (epi->on_list)
- list_del_rcu(&epi->fllink);
+ list_del_rcu(&epi->fllink);
spin_unlock(&tfile->f_lock);
rb_erase(&epi->rbn, &ep->rbr);