]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix updating bio's front segment size
authorMing Lei <ming.lei@redhat.com>
Sat, 2 Mar 2019 08:43:44 +0000 (16:43 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 2 Mar 2019 19:45:37 +0000 (12:45 -0700)
commit6e95506f295c1b4e072c8265229ebdba57fbdc07
tree79d3ec0b8a6fe6b928beeeb25af27f57bbe6bcb8
parent244cbbd39c6fdb14eb97bd305b64496ae594cc92
block: fix updating bio's front segment size

When the current bvec can be merged to the 1st segment, the bio's front
segment size has to be updated.

However, dabaa841f49c doesn't consider that case, then bio's front
segment size may not be correct.

This patch fixes this issue.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Omar Sandoval <osandov@fb.com>
Fixes: dabaa841f49c ("block: use bio_for_each_bvec() to compute multi-page bvec count")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c