Skip to content

Commit e411596

Browse files
soheilhytorvalds
authored andcommitted
epoll: move eavail next to the list_empty_careful check
This is a no-op change and simply to make the code more coherent. Link: https://lkml.kernel.org/r/20201106231635.3528496-5-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Khazhismel Kumykov <khazhy@google.com> Cc: Guantao Liu <guantaol@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cccd29b commit e411596

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/eventpoll.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
18281828
if (!eavail)
18291829
timed_out = !schedule_hrtimeout_range(to, slack,
18301830
HRTIMER_MODE_ABS);
1831+
__set_current_state(TASK_RUNNING);
18311832

18321833
/*
18331834
* We were woken up, thus go and try to harvest some events.
@@ -1837,8 +1838,6 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
18371838
eavail = 1;
18381839
} while (0);
18391840

1840-
__set_current_state(TASK_RUNNING);
1841-
18421841
if (!list_empty_careful(&wait.entry)) {
18431842
write_lock_irq(&ep->lock);
18441843
/*

0 commit comments

Comments
 (0)