diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-08-27 19:01:47 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-27 10:40:20 -0600 |
commit | 58c898ba370e68d39470cd0d932b524682c1f9be (patch) | |
tree | 44a7e85517859b3a25d63b5a8f5b00a2995fd3e5 /block/blk-wbt.c | |
parent | c6ba933358f0d7a6a042b894dba20cc70396a6d3 (diff) | |
download | lwn-58c898ba370e68d39470cd0d932b524682c1f9be.tar.gz lwn-58c898ba370e68d39470cd0d932b524682c1f9be.zip |
block: add helper for checking if queue is registered
There are 4 users which check if queue is registered, so add one helper
to check it.
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-wbt.c')
-rw-r--r-- | block/blk-wbt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 313f45a37e9d..c4d3089e47f7 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -656,7 +656,7 @@ void wbt_enable_default(struct request_queue *q) return; /* Queue not registered? Maybe shutting down... */ - if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags)) + if (!blk_queue_registered(q)) return; if (queue_is_mq(q) && IS_ENABLED(CONFIG_BLK_WBT_MQ)) |