aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoheil Hassas Yeganeh <[email protected]>2020-12-18 14:01:54 -0800
committerLinus Torvalds <[email protected]>2020-12-19 11:18:37 -0800
commite411596d48b5b77632deb91afcbc3185b9b658cb (patch)
treeb89bc08681b2831ae6a2a39fb361f714785af08e
parentcccd29bf0823bdfeb087b7661b06856b1b73bced (diff)
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/[email protected] Signed-off-by: Soheil Hassas Yeganeh <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Reviewed-by: Khazhismel Kumykov <[email protected]> Cc: Guantao Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/eventpoll.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index b9d87745fae6..d8eef2157587 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1828,6 +1828,7 @@ fetch_events:
if (!eavail)
timed_out = !schedule_hrtimeout_range(to, slack,
HRTIMER_MODE_ABS);
+ __set_current_state(TASK_RUNNING);
/*
* We were woken up, thus go and try to harvest some events.
@@ -1837,8 +1838,6 @@ fetch_events:
eavail = 1;
} while (0);
- __set_current_state(TASK_RUNNING);
-
if (!list_empty_careful(&wait.entry)) {
write_lock_irq(&ep->lock);
/*