* [PATCH] block: remove __blk_get_queue
@ 2022-07-21 6:34 Christoph Hellwig
2022-07-21 6:35 ` Johannes Thumshirn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-07-21 6:34 UTC (permalink / raw)
To: axboe; +Cc: linux-block
__blk_get_queue is only called by blk_get_queue, so merge the two.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-core.c | 10 ++++------
block/blk.h | 5 -----
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 123468b9d2e43..3d286a256d3d3 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -461,12 +461,10 @@ struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu)
*/
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);
diff --git a/block/blk.h b/block/blk.h
index c4b084bfe87c9..1d83b1d41cd10 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -31,11 +31,6 @@ extern struct kmem_cache *blk_requestq_srcu_cachep;
extern struct kobj_type blk_queue_ktype;
extern struct ida blk_queue_ida;
-static inline void __blk_get_queue(struct request_queue *q)
-{
- kobject_get(&q->kobj);
-}
-
bool is_flush_rq(struct request *req);
struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] block: remove __blk_get_queue
2022-07-21 6:34 [PATCH] block: remove __blk_get_queue Christoph Hellwig
@ 2022-07-21 6:35 ` Johannes Thumshirn
2022-07-21 17:01 ` Chaitanya Kulkarni
2022-07-21 17:03 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2022-07-21 6:35 UTC (permalink / raw)
To: Christoph Hellwig, axboe; +Cc: linux-block
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: remove __blk_get_queue
2022-07-21 6:34 [PATCH] block: remove __blk_get_queue Christoph Hellwig
2022-07-21 6:35 ` Johannes Thumshirn
@ 2022-07-21 17:01 ` Chaitanya Kulkarni
2022-07-21 17:03 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2022-07-21 17:01 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block, axboe
On 7/20/2022 11:34 PM, Christoph Hellwig wrote:
> __blk_get_queue is only called by blk_get_queue, so merge the two.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] block: remove __blk_get_queue
2022-07-21 6:34 [PATCH] block: remove __blk_get_queue Christoph Hellwig
2022-07-21 6:35 ` Johannes Thumshirn
2022-07-21 17:01 ` Chaitanya Kulkarni
@ 2022-07-21 17:03 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2022-07-21 17:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block
On Thu, 21 Jul 2022 08:34:32 +0200, Christoph Hellwig wrote:
> __blk_get_queue is only called by blk_get_queue, so merge the two.
>
>
Applied, thanks!
[1/1] block: remove __blk_get_queue
commit: 828b5f017d9d5d0491cd2e71d48f4f2139078e2c
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-21 17:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 6:34 [PATCH] block: remove __blk_get_queue Christoph Hellwig
2022-07-21 6:35 ` Johannes Thumshirn
2022-07-21 17:01 ` Chaitanya Kulkarni
2022-07-21 17:03 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.