]> git.baikalelectronics.ru Git - kernel.git/commit
block: simplify calling convention of elv_unregister_queue()
authorEric Biggers <ebiggers@google.com>
Mon, 24 Jan 2022 21:59:36 +0000 (13:59 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 28 Feb 2022 13:40:23 +0000 (06:40 -0700)
commita01d6470c42d94a9ac46bf6288942baa09540eb0
tree4907b114a9e1fd2a3e4c05855fffc75ca2010d7e
parentd03b47f128895de7cc969f3cc0d3354510afc223
block: simplify calling convention of elv_unregister_queue()

Make elv_unregister_queue() a no-op if q->elevator is NULL or is not
registered.

This simplifies the existing callers, as well as the future caller in
the error path of blk_register_queue().

Also don't bother checking whether q is NULL, since it never is.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220124215938.2769-2-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-sysfs.c
block/elevator.c