Loading fs/eventpoll.c +7 −9 Original line number Diff line number Diff line Loading @@ -1750,7 +1750,7 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests) * during ep_insert(). */ if (list_empty(&epi->ffd.file->f_tfile_llink)) { get_file(epi->ffd.file); if (get_file_rcu(epi->ffd.file)) list_add(&epi->ffd.file->f_tfile_llink, &tfile_check_list); } Loading Loading @@ -1948,10 +1948,8 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, mutex_lock(&epmutex); if (is_file_epoll(tf.file)) { error = -ELOOP; if (ep_loop_check(ep, tf.file) != 0) { clear_tfile_check_list(); if (ep_loop_check(ep, tf.file) != 0) goto error_tgt_fput; } } else { get_file(tf.file); list_add(&tf.file->f_tfile_llink, Loading Loading @@ -1980,8 +1978,6 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, error = ep_insert(ep, &epds, tf.file, fd, full_check); } else error = -EEXIST; if (full_check) clear_tfile_check_list(); break; case EPOLL_CTL_DEL: if (epi) Loading @@ -2004,8 +2000,10 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, mutex_unlock(&ep->mtx); error_tgt_fput: if (full_check) if (full_check) { clear_tfile_check_list(); mutex_unlock(&epmutex); } fdput(tf); error_fput: Loading Loading
fs/eventpoll.c +7 −9 Original line number Diff line number Diff line Loading @@ -1750,7 +1750,7 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests) * during ep_insert(). */ if (list_empty(&epi->ffd.file->f_tfile_llink)) { get_file(epi->ffd.file); if (get_file_rcu(epi->ffd.file)) list_add(&epi->ffd.file->f_tfile_llink, &tfile_check_list); } Loading Loading @@ -1948,10 +1948,8 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, mutex_lock(&epmutex); if (is_file_epoll(tf.file)) { error = -ELOOP; if (ep_loop_check(ep, tf.file) != 0) { clear_tfile_check_list(); if (ep_loop_check(ep, tf.file) != 0) goto error_tgt_fput; } } else { get_file(tf.file); list_add(&tf.file->f_tfile_llink, Loading Loading @@ -1980,8 +1978,6 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, error = ep_insert(ep, &epds, tf.file, fd, full_check); } else error = -EEXIST; if (full_check) clear_tfile_check_list(); break; case EPOLL_CTL_DEL: if (epi) Loading @@ -2004,8 +2000,10 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, mutex_unlock(&ep->mtx); error_tgt_fput: if (full_check) if (full_check) { clear_tfile_check_list(); mutex_unlock(&epmutex); } fdput(tf); error_fput: Loading