aboutsummaryrefslogtreecommitdiffstats
path: root/block/bio-integrity.c
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2019-03-05 20:49:33 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-03-05 20:49:33 -0500
commit113a670ce2eb3daca9fa9c4f43d064d002db7c9b (patch)
tree691e9b7e2a21f4cf455f667e82e0992732236f0b /block/bio-integrity.c
parent6e1d4e3b8784387cfdf09abc1fe9c2f2f12a37ea (diff)
parent1c163f4c7b3f621efff9b28a47abb36f7378d783 (diff)
downloadlinux-yocto-113a670ce2eb3daca9fa9c4f43d064d002db7c9b.tar.gz
linux-yocto-113a670ce2eb3daca9fa9c4f43d064d002db7c9b.tar.bz2
linux-yocto-113a670ce2eb3daca9fa9c4f43d064d002db7c9b.zip
Merge branch 'master-5.0'
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'block/bio-integrity.c')
-rw-r--r--block/bio-integrity.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 67b5fb861a51..1b633a3526d4 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -306,6 +306,8 @@ bool bio_integrity_prep(struct bio *bio)
if (bio_data_dir(bio) == WRITE) {
bio_integrity_process(bio, &bio->bi_iter,
bi->profile->generate_fn);
+ } else {
+ bip->bio_iter = bio->bi_iter;
}
return true;
@@ -331,20 +333,14 @@ static void bio_integrity_verify_fn(struct work_struct *work)
container_of(work, struct bio_integrity_payload, bip_work);
struct bio *bio = bip->bip_bio;
struct blk_integrity *bi = blk_get_integrity(bio->bi_disk);
- struct bvec_iter iter = bio->bi_iter;
/*
* At the moment verify is called bio's iterator was advanced
* during split and completion, we need to rewind iterator to
* it's original position.
*/
- if (bio_rewind_iter(bio, &iter, iter.bi_done)) {
- bio->bi_status = bio_integrity_process(bio, &iter,
- bi->profile->verify_fn);
- } else {
- bio->bi_status = BLK_STS_IOERR;
- }
-
+ bio->bi_status = bio_integrity_process(bio, &bip->bio_iter,
+ bi->profile->verify_fn);
bio_integrity_free(bio);
bio_endio(bio);
}
@@ -394,7 +390,6 @@ void bio_integrity_advance(struct bio *bio, unsigned int bytes_done)
bip->bip_iter.bi_sector += bytes_done >> 9;
bvec_iter_advance(bip->bip_vec, &bip->bip_iter, bytes);
}
-EXPORT_SYMBOL(bio_integrity_advance);
/**
* bio_integrity_trim - Trim integrity vector
@@ -464,7 +459,6 @@ void bioset_integrity_free(struct bio_set *bs)
mempool_exit(&bs->bio_integrity_pool);
mempool_exit(&bs->bvec_integrity_pool);
}
-EXPORT_SYMBOL(bioset_integrity_free);
void __init bio_integrity_init(void)
{