block: Simplify blk_bio_segment_split()
authorBart Van Assche <bvanassche@acm.org>
Thu, 1 Aug 2019 22:50:43 +0000 (15:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:41:29 +0000 (21:41 -0600)
commit708b25b344fd9bedd02ccc0f8eee71f7006d7d07
tree10e66635ab399a06a933807a59db788164a18fb4
parentff9811b3cf2092fe6c39cf694e5e7f949f3b2c16
block: Simplify blk_bio_segment_split()

Move the max_sectors check into bvec_split_segs() such that a single
call to that function can do all the necessary checks. This patch
optimizes the fast path further, namely if a bvec fits in a page.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c