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     |    3 +--
 include/linux/bio.h |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -230,8 +230,7 @@ out_bmd:
 	return ret;
 }
 
-static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
-		gfp_t gfp_mask)
+int bio_map_user_iov(struct request *rq, struct iov_iter *iter, gfp_t gfp_mask)
 {
 	unsigned int max_sectors = queue_max_hw_sectors(rq->q);
 	struct bio *bio;
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -452,6 +452,7 @@ static inline int bio_iov_vecs_to_alloc(
 }
 
 struct request_queue;
+struct request;
 
 extern int submit_bio_wait(struct bio *bio);
 extern void bio_init(struct bio *bio, struct bio_vec *table,
@@ -473,6 +474,7 @@ void __bio_add_page(struct bio *bio, str
 int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter);
 void bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter);
 void __bio_release_pages(struct bio *bio, bool mark_dirty);
+extern int bio_map_user_iov(struct request *, struct iov_iter *, gfp_t);
 extern void bio_set_pages_dirty(struct bio *bio);
 extern void bio_check_pages_dirty(struct bio *bio);