]> git.baikalelectronics.ru Git - kernel.git/commit
block: simplify blk_recalc_rq_segments
authorChristoph Hellwig <hch@lst.de>
Thu, 6 Jun 2019 10:29:02 +0000 (12:29 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Jun 2019 16:29:22 +0000 (10:29 -0600)
commitceba84b4c448c97aec185082e068bf3a5eb80857
tree323cfe08f79300ebe2fa72105e4c7f4d6d1c17d5
parent4992a4fcb47a27e42eb1ed17f1a652eda8b6c2b4
block: simplify blk_recalc_rq_segments

Return the segement and let the callers assign them, which makes the code
a littler more obvious.  Also pass the request instead of q plus bio
chain, allowing for the use of rq_for_each_bvec.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-merge.c
block/blk.h