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); /*