Commit bb632bc44970f75b66df102e831a4fc0692e9159
Committed by
Ingo Molnar
1 parent
2953ef246b
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
sched/wait: Change the wait_exclusive control flow
Purely a preparatory patch; it changes the control flow to match what will soon be generated by generic code so that that patch can be a unity transform. Reviewed-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20131002092528.107994763@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Showing 1 changed file with 5 additions and 4 deletions Side-by-side Diff
include/linux/wait.h
... | ... | @@ -428,23 +428,24 @@ |
428 | 428 | |
429 | 429 | #define __wait_event_interruptible_exclusive(wq, condition, ret) \ |
430 | 430 | do { \ |
431 | + __label__ __out; \ | |
431 | 432 | DEFINE_WAIT(__wait); \ |
432 | 433 | \ |
433 | 434 | for (;;) { \ |
434 | 435 | prepare_to_wait_exclusive(&wq, &__wait, \ |
435 | 436 | TASK_INTERRUPTIBLE); \ |
436 | - if (condition) { \ | |
437 | - finish_wait(&wq, &__wait); \ | |
437 | + if (condition) \ | |
438 | 438 | break; \ |
439 | - } \ | |
440 | 439 | if (signal_pending(current)) { \ |
441 | 440 | ret = -ERESTARTSYS; \ |
442 | 441 | abort_exclusive_wait(&wq, &__wait, \ |
443 | 442 | TASK_INTERRUPTIBLE, NULL); \ |
444 | - break; \ | |
443 | + goto __out; \ | |
445 | 444 | } \ |
446 | 445 | schedule(); \ |
447 | 446 | } \ |
447 | + finish_wait(&wq, &__wait); \ | |
448 | +__out: ; \ | |
448 | 449 | } while (0) |
449 | 450 | |
450 | 451 | #define wait_event_interruptible_exclusive(wq, condition) \ |