diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 9ae301bc016c..c4c833bad4b7 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -2074,6 +2074,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, mutex_lock_nested(&ep->mtx, 0); if (op == EPOLL_CTL_ADD) { if (!list_empty(&f.file->f_ep_links) || + ep->gen == loop_check_gen || is_file_epoll(tf.file)) { full_check = 1; mutex_unlock(&ep->mtx);