Commit 9636e650 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

fs: build the legacy direct I/O code conditionally



Add a new LEGACY_DIRECT_IO config symbol that is only selected by the
file systems that still use the legacy blockdev_direct_IO code, so that
kernels without support for those file systems don't need to build the
code.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20230125065839.191256-3-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 439bc39b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@ config VALIDATE_FS_PARSER
config FS_IOMAP
	bool

# old blockdev_direct_IO implementation.  Use iomap for new code instead
config LEGACY_DIRECT_IO
	bool

if BLOCK

source "fs/ext2/Kconfig"
+2 −1
Original line number Diff line number Diff line
@@ -19,13 +19,14 @@ obj-y := open.o read_write.o file_table.o super.o \
		kernel_read_file.o remap_range.o

ifeq ($(CONFIG_BLOCK),y)
obj-y +=	buffer.o direct-io.o mpage.o
obj-y +=	buffer.o mpage.o
else
obj-y +=	no-block.o
endif

obj-$(CONFIG_PROC_FS) += proc_namespace.o

obj-$(CONFIG_LEGACY_DIRECT_IO)	+= direct-io.o
obj-y				+= notify/
obj-$(CONFIG_EPOLL)		+= eventpoll.o
obj-y				+= anon_inodes.o
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
config AFFS_FS
	tristate "Amiga FFS file system support"
	depends on BLOCK
	select LEGACY_DIRECT_IO
	help
	  The Fast File System (FFS) is the common file system used on hard
	  disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20).  Say Y
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
config EXFAT_FS
	tristate "exFAT filesystem support"
	select NLS
	select LEGACY_DIRECT_IO
	help
	  This allows you to mount devices formatted with the exFAT file system.
	  exFAT is typically used on SD-Cards or USB sticks.
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
config EXT2_FS
	tristate "Second extended fs support"
	select FS_IOMAP
	select LEGACY_DIRECT_IO
	help
	  Ext2 is a standard Linux file system for hard disks.

Loading