mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
blk-mq: Make bt_clear_tag() easier to read
Eliminate a backwards goto statement from bt_clear_tag(). Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
abab13b5c4
commit
9d8f0bcca6
@ -351,15 +351,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user