@@ -7,6 +7,8 @@
* Copyright (c) 2021, Jianpeng Ma <jianpeng.ma@intel.com>.
*/
+#ifdef CONFIG_BCACHE_NVM_PAGES
+
#include "bcache.h"
#include "nvm-pages.h"
@@ -23,8 +25,6 @@
#include <linux/blkdev.h>
#include <linux/bcache-nvm.h>
-#ifdef CONFIG_BCACHE_NVM_PAGES
-
struct bch_nvm_set *only_set;
static void release_nvm_namespaces(struct bch_nvm_set *nvm_set)
@@ -3,8 +3,10 @@
#ifndef _BCACHE_NVM_PAGES_H
#define _BCACHE_NVM_PAGES_H
+#ifdef CONFIG_BCACHE_NVM_PAGES
#include <linux/bcache-nvm.h>
#include <linux/libnvdimm.h>
+#endif /* CONFIG_BCACHE_NVM_PAGES */
/*
* Bcache NVDIMM in memory data structures
This patch fixes the compiling error when BCACHE_NVM_PAGES is disabled. The change could be added into previous nvm-pages patches, so that this patch can be dropped in next nvm-pages series. Signed-off-by: Coly Li <colyli@suse.de> Cc: Jianpeng Ma <jianpeng.ma@intel.com> Cc: Qiaowei Ren <qiaowei.ren@intel.com> --- drivers/md/bcache/nvm-pages.c | 4 ++-- drivers/md/bcache/nvm-pages.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)