mirror of https://gitee.com/openkylin/linux.git
block: use helper function to test queue register
We have defined common interface blk_queue_registered() to test QUEUE_FLAG_REGISTERED. Just use it. Signed-off-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
6251b754f5
commit
75e6c00fc7
|
@ -669,7 +669,7 @@ static struct ioc *q_to_ioc(struct request_queue *q)
|
|||
|
||||
static const char *q_name(struct request_queue *q)
|
||||
{
|
||||
if (test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags))
|
||||
if (blk_queue_registered(q))
|
||||
return kobject_name(q->kobj.parent);
|
||||
else
|
||||
return "<unknown>";
|
||||
|
|
|
@ -672,7 +672,7 @@ void elevator_init_mq(struct request_queue *q)
|
|||
if (!elv_support_iosched(q))
|
||||
return;
|
||||
|
||||
WARN_ON_ONCE(test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags));
|
||||
WARN_ON_ONCE(blk_queue_registered(q));
|
||||
|
||||
if (unlikely(q->elevator))
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue