block: don't bloat enter_queue with percpu_ref
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 19 Oct 2021 21:24:13 +0000 (22:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Oct 2021 14:08:06 +0000 (08:08 -0600)
percpu_ref_put() are inlined for performance and bloat the binary, we
don't care about the fail case of blk_try_enter_queue(), so we can
replace it with a call to blk_queue_exit().

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c

index c1ba347..88752e5 100644 (file)
@@ -404,7 +404,7 @@ static bool blk_try_enter_queue(struct request_queue *q, bool pm)
        return true;
 
 fail_put:
-       percpu_ref_put(&q->q_usage_counter);
+       blk_queue_exit(q);
 fail:
        rcu_read_unlock();
        return false;