block: mark queue init done at the end of blk_register_queue
authorMing Lei <ming.lei@redhat.com>
Wed, 9 Jun 2021 01:58:22 +0000 (09:58 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Jun 2021 14:41:50 +0000 (08:41 -0600)
commita72c374f97a4c7b2f9dde5144c867fec4bdcd798
treecddac674799db622785784702ade8e4d34821d9a
parent2cafe29a8d03f02a3d16193bdaae2f3e82a423f9
block: mark queue init done at the end of blk_register_queue

Mark queue init done when everything is done well in blk_register_queue(),
so that wbt_enable_default() can be run quickly without any RCU period
involved since adding rq qos requires to freeze queue.

Also no any side effect by delaying to mark queue init done.

Reported-by: Yi Zhang <yi.zhang@redhat.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Link: https://lore.kernel.org/r/20210609015822.103433-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-sysfs.c