kmod-kvdo/0001-Eliminate-use-of-bvec_kmap_irq.patch
Andrew Walsh f3f2514a3f Updated for recent kernel changes.
Eliminated the use of bvec_kmap_irq.patch
Removed usage of removed elevator constants

Resolves: rhbz#2035003

Signed-off-by: Andrew Walsh <awalsh@redhat.com>
2021-12-23 19:23:09 -05:00

59 lines
1.7 KiB
Diff

From 1dfccb284d3eb487028adc9006afb9ba0869e687 Mon Sep 17 00:00:00 2001
From: Joseph Chapman <jochapma@redhat.com>
Date: Thu, 23 Dec 2021 09:05:15 -0500
Subject: [PATCH] Eliminate use of bvec_kmap_irq
Signed-off-by: Joseph Chapman <jochapma@redhat.com>
---
vdo/bio.c | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/vdo/bio.c b/vdo/bio.c
index 70f7a7d0..8234c7ed 100644
--- a/vdo/bio.c
+++ b/vdo/bio.c
@@ -40,15 +40,11 @@ void vdo_bio_copy_data_in(struct bio *bio, char *data_ptr)
{
struct bio_vec biovec;
struct bvec_iter iter;
- unsigned long flags;
- bio_for_each_segment(biovec, bio, iter) {
- void *from = bvec_kmap_irq(&biovec, &flags);
-
- memcpy(data_ptr, from, biovec.bv_len);
- data_ptr += biovec.bv_len;
- bvec_kunmap_irq(from, &flags);
- }
+ bio_for_each_segment(biovec, bio, iter) {
+ memcpy_from_bvec(data_ptr, &biovec);
+ data_ptr += biovec.bv_len;
+ }
}
/**********************************************************************/
@@ -56,16 +52,11 @@ void vdo_bio_copy_data_out(struct bio *bio, char *data_ptr)
{
struct bio_vec biovec;
struct bvec_iter iter;
- unsigned long flags;
- bio_for_each_segment(biovec, bio, iter) {
- void *dest = bvec_kmap_irq(&biovec, &flags);
-
- memcpy(dest, data_ptr, biovec.bv_len);
- data_ptr += biovec.bv_len;
- flush_dcache_page(biovec.bv_page);
- bvec_kunmap_irq(dest, &flags);
- }
+ bio_for_each_segment(biovec, bio, iter) {
+ memcpy_to_bvec(&biovec, data_ptr);
+ data_ptr += biovec.bv_len;
+ }
}
/**********************************************************************/
--
2.31.1