block: add proper helpers for elevator_type module refcount management
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Oct 2022 06:48:16 +0000 (08:48 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Oct 2022 00:59:17 +0000 (18:59 -0600)
commitdd6f7f17bf5831ac94d2b8ffe3d67dac201a9b97
treec2898bdc5199cb3de5027f38df1afd042f6a78c6
parent671fae5e51297fc76b3758ca2edd514858734a6a
block: add proper helpers for elevator_type module refcount management

Make sure we have helpers for all relevant module refcount operations on
the elevator_type in elevator.h, and use them.  Move the call to the get
helper in blk_mq_elv_switch_none a bit so that it is obvious with a less
verbose comment.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221020064819.1469928-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
block/elevator.c
block/elevator.h