diff options
author | Greg Edwards <gedwards@ddn.com> | 2018-07-26 20:39:37 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-27 17:10:34 +0200 |
commit | 5151842b9d8732d4cbfa8400b40bff894f501b2f (patch) | |
tree | 13b3c4f70d1b2e19d6a787f2c59ccb0cad0301a0 /block/bio.c | |
parent | block: bio_iov_iter_get_pages: pin more pages for multi-segment IOs (diff) | |
download | linux-5151842b9d8732d4cbfa8400b40bff894f501b2f.tar.xz linux-5151842b9d8732d4cbfa8400b40bff894f501b2f.zip |
block: reset bi_iter.bi_done after splitting bio
After the bio has been updated to represent the remaining sectors, reset
bi_done so bio_rewind_iter() does not rewind further than it should.
This resolves a bio_integrity_process() failure on reads where the
original request was split.
Fixes: 63573e359d05 ("bio-integrity: Restore original iterator on verify stage")
Signed-off-by: Greg Edwards <gedwards@ddn.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r-- | block/bio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c index dc07a427e782..05d81912870b 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1893,6 +1893,7 @@ struct bio *bio_split(struct bio *bio, int sectors, bio_integrity_trim(split); bio_advance(bio, split->bi_iter.bi_size); + bio->bi_iter.bi_done = 0; if (bio_flagged(bio, BIO_TRACE_COMPLETION)) bio_set_flag(split, BIO_TRACE_COMPLETION); |