summaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2019-08-27 14:01:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 11:39:29 +0300
commit7f1ba7ee94ad1392fa4aace6d70cfece4e958ea0 (patch)
treeb18c2011dab42a2687cf7318ec0cb21a67ef3544 /block/elevator.c
parentd1727e0e5c680938734586af2b5764c42fc16aec (diff)
downloadlinux-7f1ba7ee94ad1392fa4aace6d70cfece4e958ea0.tar.xz
block: add helper for checking if queue is registered
commit 58c898ba370e68d39470cd0d932b524682c1f9be upstream. 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> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index ddbcd36616a8..9bffe4558929 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -1083,7 +1083,7 @@ static int __elevator_change(struct request_queue *q, const char *name)
struct elevator_type *e;
/* Make sure queue is not in the middle of being removed */
- if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags))
+ if (!blk_queue_registered(q))
return -ENOENT;
/*