[PATCH 1/2] bcache: Fix undeclared symbol warning for bcache_is_reboot
From: Gabriel Shahrouzi
Date: Mon Apr 07 2025 - 23:34:22 EST
Add extern declaration for bcache_is_reboot to bcache.h. Ensure proper
visibility for use across multiple files (super.c, sysfs.c) and follow
the declaration pattern for other forward declarations.
Signed-off-by: Gabriel Shahrouzi <gshahrouzi@xxxxxxxxx>
---
drivers/md/bcache/bcache.h | 1 +
drivers/md/bcache/sysfs.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
index 785b0d9008fac..531933351b8b8 100644
--- a/drivers/md/bcache/bcache.h
+++ b/drivers/md/bcache/bcache.h
@@ -1007,6 +1007,7 @@ extern struct workqueue_struct *bch_journal_wq;
extern struct workqueue_struct *bch_flush_wq;
extern struct mutex bch_register_lock;
extern struct list_head bch_cache_sets;
+extern bool bcache_is_reboot;
extern const struct kobj_type bch_cached_dev_ktype;
extern const struct kobj_type bch_flash_dev_ktype;
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index e8f696cb58c05..47ef0167b9d23 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -17,8 +17,6 @@
#include <linux/sort.h>
#include <linux/sched/clock.h>
-extern bool bcache_is_reboot;
-
/* Default is 0 ("writethrough") */
static const char * const bch_cache_modes[] = {
"writethrough",
--
2.43.0