]> git.baikalelectronics.ru Git - kernel.git/commit
block: Allow unfreezing of a queue while requests are in progress
authorBart Van Assche <bvanassche@acm.org>
Wed, 26 Sep 2018 21:01:08 +0000 (14:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Sep 2018 21:11:29 +0000 (15:11 -0600)
commitaa91f3cda312ed5839d2349e1350646b9c6be85a
treefb7cfd6f386ca0d86bd0dc3f3ebe8341defa65f9
parent912791d4fc0bec5e5836f3a7112dfe87325a9049
block: Allow unfreezing of a queue while requests are in progress

A later patch will call blk_freeze_queue_start() followed by
blk_mq_unfreeze_queue() without waiting for q_usage_counter to drop
to zero. Make sure that this doesn't cause a kernel warning to appear
by switching from percpu_ref_reinit() to percpu_ref_resurrect(). The
former namely requires that the refcount it operates on is zero.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jianchao Wang <jianchao.w.wang@oracle.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c