diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-04-02 10:26:44 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-08 10:57:10 -0600 |
commit | b21e11c5c8311b8bf6923ff29d57f2a5f997e939 (patch) | |
tree | 0c2becff5ec805afd350fd73e8f446f52f925de9 /virt/Makefile | |
parent | 636b8fe86bede8c9f797365986b8406ff2183f13 (diff) | |
download | linux-b21e11c5c8311b8bf6923ff29d57f2a5f997e939.tar.bz2 |
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>
Diffstat (limited to 'virt/Makefile')
0 files changed, 0 insertions, 0 deletions