]> git.baikalelectronics.ru Git - kernel.git/commit
block: open code blk_max_size_offset in blk_rq_get_max_sectors
authorChristoph Hellwig <hch@lst.de>
Tue, 14 Jun 2022 09:09:31 +0000 (11:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Jun 2022 12:29:11 +0000 (06:29 -0600)
commitd81203ad182f764a0a8e389783d65be556dfbbaf
tree53b9246a5dacd78107c04abe80713708dbf6e6a7
parent52a1eccce5e9f08f215f7aa7163a96a747c0481e
block: open code blk_max_size_offset in blk_rq_get_max_sectors

blk_rq_get_max_sectors always uses q->limits.chunk_sectors as the
chunk_sectors argument, and already checks for max_sectors through the
call to blk_queue_get_max_sectors.  That means much of
blk_max_size_offset is not needed and open coding it simplifies the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220614090934.570632-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c