mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
c5db2cfc62
commit
828b5f017d
@ -461,12 +461,10 @@ fail_q:
|
|||||||
*/
|
*/
|
||||||
bool blk_get_queue(struct request_queue *q)
|
bool blk_get_queue(struct request_queue *q)
|
||||||
{
|
{
|
||||||
if (likely(!blk_queue_dying(q))) {
|
if (unlikely(blk_queue_dying(q)))
|
||||||
__blk_get_queue(q);
|
return false;
|
||||||
return true;
|
kobject_get(&q->kobj);
|
||||||
}
|
return true;
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(blk_get_queue);
|
EXPORT_SYMBOL(blk_get_queue);
|
||||||
|
|
||||||
|
@ -31,11 +31,6 @@ extern struct kmem_cache *blk_requestq_srcu_cachep;
|
|||||||
extern struct kobj_type blk_queue_ktype;
|
extern struct kobj_type blk_queue_ktype;
|
||||||
extern struct ida blk_queue_ida;
|
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);
|
bool is_flush_rq(struct request *req);
|
||||||
|
|
||||||
struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
|
struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
|
||||||
|
Loading…
Reference in New Issue
Block a user