block: factor out a blk_try_enter_queue helper
authorChristoph Hellwig <hch@lst.de>
Wed, 29 Sep 2021 07:12:38 +0000 (09:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 16 Oct 2021 03:02:44 +0000 (21:02 -0600)
commit1f14a0989073459c2be6b5c7b3fb7f9f3d7fa2af
treedaf8fd67682f5150f3f3f9fe02d2ae6e1ead31cb
parentcc9c884dd7f4f036965e23f5445f838db316eb46
block: factor out a blk_try_enter_queue helper

Factor out the code to try to get q_usage_counter without blocking into
a separate helper.  Both to improve code readability and to prepare for
splitting bio_queue_enter from blk_queue_enter.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20210929071241.934472-3-hch@lst.de
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c