diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-21 08:34:32 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-21 19:03:17 +0200 |
commit | 828b5f017d9d5d0491cd2e71d48f4f2139078e2c (patch) | |
tree | bdf754cd8317998777bcb592b0b983128a61cbfd /block/blk-core.c | |
parent | block: call blk_mq_exit_queue from disk_release for never added disks (diff) | |
download | linux-828b5f017d9d5d0491cd2e71d48f4f2139078e2c.tar.xz linux-828b5f017d9d5d0491cd2e71d48f4f2139078e2c.zip |
block: remove __blk_get_queue
__blk_get_queue is only called by blk_get_queue, so merge the two.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220721063432.1714609-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 123468b9d2e4..3d286a256d3d 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -461,12 +461,10 @@ fail_q: */ bool blk_get_queue(struct request_queue *q) { - if (likely(!blk_queue_dying(q))) { - __blk_get_queue(q); - return true; - } - - return false; + if (unlikely(blk_queue_dying(q))) + return false; + kobject_get(&q->kobj); + return true; } EXPORT_SYMBOL(blk_get_queue); |