[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230904042243.820031-1-guochunhai@vivo.com>
Date: Sun, 3 Sep 2023 22:22:43 -0600
From: Chunhai Guo <guochunhai@...o.com>
To: axboe@...nel.dk
Cc: chao@...nel.org, jaegeuk@...nel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, Chunhai Guo <guochunhai@...o.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] block: export symbol blk_flush_plug
blk_flush_plug() can be used in a filesystem module, without it may cause
a link failure, as shown in the reported test.
ERROR: modpost: "__blk_flush_plug" [fs/f2fs/f2fs.ko] undefined!
Export the symbol so it can be used by filesystem module.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309021523.UcS7T7mp-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202309021427.K1P8kWbl-lkp@intel.com/
Fixes: e1e9b8062c74 ("f2fs: replace blk_finish_plug() with blk_flush_plug()")
Signed-off-by: Chunhai Guo <guochunhai@...o.com>
---
block/blk-core.c | 7 +++++++
include/linux/blkdev.h | 8 +-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 99d8b9812b18..1c5e5d3406fe 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1156,6 +1156,13 @@ void __blk_flush_plug(struct blk_plug *plug, bool from_schedule)
blk_mq_free_plug_rqs(plug);
}
+void blk_flush_plug(struct blk_plug *plug, bool async)
+{
+ if (plug)
+ __blk_flush_plug(plug, async);
+}
+EXPORT_SYMBOL(blk_flush_plug);
+
/**
* blk_finish_plug - mark the end of a batch of submitted I/O
* @plug: The &struct blk_plug passed to blk_start_plug()
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ed44a997f629..26ff9d417e6e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -986,13 +986,7 @@ extern struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug,
extern void blk_start_plug(struct blk_plug *);
extern void blk_start_plug_nr_ios(struct blk_plug *, unsigned short);
extern void blk_finish_plug(struct blk_plug *);
-
-void __blk_flush_plug(struct blk_plug *plug, bool from_schedule);
-static inline void blk_flush_plug(struct blk_plug *plug, bool async)
-{
- if (plug)
- __blk_flush_plug(plug, async);
-}
+extern void blk_flush_plug(struct blk_plug *plug, bool async);
int blkdev_issue_flush(struct block_device *bdev);
long nr_blockdev_pages(void);
--
2.25.1
Powered by blists - more mailing lists