]> git.baikalelectronics.ru Git - kernel.git/commit
sched/wait: Add ___wait_cond_timeout() to wait_event*_timeout() too
authorOleg Nesterov <oleg@redhat.com>
Mon, 7 Oct 2013 18:31:06 +0000 (20:31 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 16 Oct 2013 12:22:17 +0000 (14:22 +0200)
commit36dfb9b40aa4e7ce128341e528a46ec055c0e626
treed0770b40ff4d01aaaf050a651c717337b237294e
parent1cc1cf3f06eb94a12b02ea6a54a1b6cc967914e3
sched/wait: Add ___wait_cond_timeout() to wait_event*_timeout() too

Commit 78eb2f3b ("wait: fix false timeouts when using
wait_event_timeout()") introduced the additional condition checks
after a timeout but only in the "slow" __wait*() paths.

wait_event_timeout(wq, CONDITION, 0) still returns 0 if CONDITION
is already true and we do not call __wait*().

Now that we have ___wait_cond_timeout() we can use it instead to
ensure that __ret will be properly updated.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131007183106.GA10973@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/wait.h