Searched hist:b21e11c5c8311b8bf6923ff29d57f2a5f997e939 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/block/ |
H A D | blk-merge.c | diff b21e11c5c8311b8bf6923ff29d57f2a5f997e939 Mon Apr 01 21:26:44 CDT 2019 Ming Lei <ming.lei@redhat.com> block: fix build warning in merging bvecs
Commit f6970f83ef79 ("block: don't check if adjacent bvecs in one bio can be mergeable") changes bvec merge by only considering two bvecs from different bios. However, if the former bio doesn't inlcude any io bvec, then the following warning may be triggered:
warning: ‘bvec.bv_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
In practice, it shouldn't be triggered.
Fixes it by adding check on former bio, the check shouldn't add any cost given 'bio->bi_iter' can be hit in cache.
Reported-by: Jens Axboe <axboe@kernel.dk> Fixes: f6970f83ef79 ("block: don't check if adjacent bvecs in one bio can be mergeable") Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
|