Commit eb7175dd authored by Bart Van Assche's avatar Bart Van Assche Committed by Ben Hutchings

blk-mq: Make bt_clear_tag() easier to read

commit 9d8f0bcc upstream.

Eliminate a backwards goto statement from bt_clear_tag().
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 2b39b5fe
......@@ -352,15 +352,12 @@ static void bt_clear_tag(struct blk_mq_bitmap_tags *bt, unsigned int tag)
return;
wait_cnt = atomic_dec_return(&bs->wait_cnt);
if (unlikely(wait_cnt < 0))
wait_cnt = atomic_inc_return(&bs->wait_cnt);
if (wait_cnt == 0) {
wake:
atomic_add(bt->wake_cnt, &bs->wait_cnt);
bt_index_atomic_inc(&bt->wake_index);
wake_up(&bs->wait);
} else if (wait_cnt < 0) {
wait_cnt = atomic_inc_return(&bs->wait_cnt);
if (!wait_cnt)
goto wake;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment