[PATCH v4 02/11] block: copy back bounce buffer to user-space correctly in case of split

Anuj Gupta anuj20.g at samsung.com
Wed Oct 16 04:29:03 PDT 2024


Copy back the bounce buffer to user-space in entirety when the parent
bio completes.

Signed-off-by: Anuj Gupta <anuj20.g at samsung.com>
---
 block/bio-integrity.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 8c41a380f2bd..8948e635432d 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -119,8 +119,8 @@ static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs,
 static void bio_integrity_uncopy_user(struct bio_integrity_payload *bip)
 {
 	unsigned short nr_vecs = bip->bip_max_vcnt - 1;
-	struct bio_vec *copy = &bip->bip_vec[1];
-	size_t bytes = bip->bip_iter.bi_size;
+	struct bio_vec *copy = &bip->bip_vec[1], *bvec = &bip->bip_vec[0];
+	size_t bytes = bvec->bv_len;
 	struct iov_iter iter;
 	int ret;
 
-- 
2.25.1




More information about the Linux-nvme mailing list