]> www.infradead.org Git - users/hch/block.git/commitdiff
block: remove __blk_get_queue
authorChristoph Hellwig <hch@lst.de>
Sat, 21 May 2022 07:44:06 +0000 (09:44 +0200)
committerChristoph Hellwig <hch@lst.de>
Sat, 18 Jun 2022 14:27:55 +0000 (16:27 +0200)
Fold __blk_get_queue into its only caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/blk-core.c
block/blk.h

index 409719b852095312c8ff03370aca9bdba06f5eb3..9f069c5a4688d9d5fe9b68ed26382e9789ff7def 100644 (file)
@@ -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);
 
index 4b2e0bc5b4a803caac557f2120694da8f3c34826..8c0842a38dd3552189faab820b46ebe92efd99a9 100644 (file)
@@ -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,