X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Feventpoll.c;h=c0b3c70ee87a2b8e0e46c01a87d63ac692aecc71;hb=715b2284cdcd6d7f5e1eea779ea9316b40b9d6f1;hp=739b0985b398ea2d837af83e26fa305a6cdfdc30;hpb=8898159650093e9eee8829e30a9139b4273a0ac4;p=~andy%2Flinux diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 739b0985b39..c0b3c70ee87 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1663,8 +1663,10 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, if (op == EPOLL_CTL_ADD) { if (is_file_epoll(tfile)) { error = -ELOOP; - if (ep_loop_check(ep, tfile) != 0) + if (ep_loop_check(ep, tfile) != 0) { + clear_tfile_check_list(); goto error_tgt_fput; + } } else list_add(&tfile->f_tfile_llink, &tfile_check_list); }