Blob Blame History Raw
From 61d0f6f2019b41d592b24e577ff8dd9a24ec4c76 Mon Sep 17 00:00:00 2001
From: Jessica Yu <jeyu@suse.de>
Date: Mon, 21 Sep 2020 15:11:44 +0200
Subject: [PATCH] oracleasm: reinstate bio_map_user_iov() declaration in
 include/linux/bio.h
Patch-mainline: Never, only needed by SLE15-SP3 oracleasm KMP
References: bsc#1176792

patches.suse/block-move-bio_map_-to-blk-map.c.patch removed the
bio_map_user_iov() function declaration from include/linux/bio.h and
made the function static. However, oracleasm uses this function and we
already export it via patches.suse/0001-oracleasm-4.0-compat-changes.patch.

Add back the function declaration for bio_map_user_iov() in
include/linux/bio.h so that oracleasm can build properly again.

Signed-off-by: Jessica Yu <jeyu@suse.de>
---
 block/blk-map.c     | 2 +-
 include/linux/bio.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/blk-map.c b/block/blk-map.c
index 5096a905b81b..4227cd02a160 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -254,7 +254,7 @@ static struct bio *bio_copy_user_iov(struct request_queue *q,
  *	Map the user space address into a bio suitable for io to a block
  *	device. Returns an error pointer in case of error.
  */
-static struct bio *bio_map_user_iov(struct request_queue *q,
+struct bio *bio_map_user_iov(struct request_queue *q,
 		struct iov_iter *iter, gfp_t gfp_mask)
 {
 	unsigned int max_sectors = queue_max_hw_sectors(q);
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 7607d556ecd7..5d2b049907d5 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -440,6 +440,8 @@ void __bio_add_page(struct bio *bio, struct page *page,
 		unsigned int len, unsigned int off);
 int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter);
 void bio_release_pages(struct bio *bio, bool mark_dirty);
+extern struct bio *bio_map_user_iov(struct request_queue *,
+                                   struct iov_iter *, gfp_t);
 extern void bio_set_pages_dirty(struct bio *bio);
 extern void bio_check_pages_dirty(struct bio *bio);
 
-- 
2.16.4