This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Oleg Nesterov <o...@redhat.com> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Johannes Weiner <han...@cmpxchg.org> Cc: Neil Brown <ne...@suse.de> Cc: Michael Shaver <jmsha...@gmail.com> --- kernel/sched/wait.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index fa12939..dcc7693 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c @@ -429,18 +429,20 @@ int __sched __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q, wait_bit_action_f *action, unsigned mode) { + struct wait_bit_key *const key = &q->key; + do { int ret; prepare_to_wait_exclusive(wq, &q->wait, mode); - if (!test_bit(q->key.bit_nr, q->key.flags)) + if (!test_bit(key->bit_nr, key->flags)) continue; - ret = action(&q->key, mode); + ret = action(key, mode); if (!ret) continue; - abort_exclusive_wait(wq, &q->wait, mode, &q->key); + abort_exclusive_wait(wq, &q->wait, mode, key); return ret; - } while (test_and_set_bit(q->key.bit_nr, q->key.flags)); + } while (test_and_set_bit(key->bit_nr, key->flags)); finish_wait(wq, &q->wait); return 0; } -- 2.9.2