iomap: build the block based code conditionally
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Nov 2021 10:22:02 +0000 (11:22 +0100)
committerDan Williams <dan.j.williams@intel.com>
Sat, 4 Dec 2021 16:58:54 +0000 (08:58 -0800)
Only build the block based iomap code if CONFIG_BLOCK is set.  Currently
that is always the case, but it will change soon.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20211129102203.2243509-29-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/Kconfig
fs/iomap/Makefile

index a6313a969bc5fde75479521e3958e89fcc60bef1..6d608330a096ee9bf1fd08b668319e180fc81633 100644 (file)
@@ -15,11 +15,11 @@ config VALIDATE_FS_PARSER
          Enable this to perform validation of the parameter description for a
          filesystem when it is registered.
 
-if BLOCK
-
 config FS_IOMAP
        bool
 
+if BLOCK
+
 source "fs/ext2/Kconfig"
 source "fs/ext4/Kconfig"
 source "fs/jbd2/Kconfig"
index 4143a3ff89dbccd2ac5fc3eb80392266e94165f1..fc070184b7faa7439cabb0b4ae64db84ac608109 100644 (file)
@@ -9,9 +9,9 @@ ccflags-y += -I $(srctree)/$(src)               # needed for trace events
 obj-$(CONFIG_FS_IOMAP)         += iomap.o
 
 iomap-y                                += trace.o \
-                                  buffered-io.o \
+                                  iter.o
+iomap-$(CONFIG_BLOCK)          += buffered-io.o \
                                   direct-io.o \
                                   fiemap.o \
-                                  iter.o \
                                   seek.o
 iomap-$(CONFIG_SWAP)           += swapfile.o