[PATCH] xfs: add CONFIG_MMU dependency

Arnd Bergmann
2024-09-09T09:19:28Z

From: Arnd Bergmann <arnd@arndb.de>

XFS no longer builds on kernels with MMU disabled:

arm-linux-gnueabi-ld: fs/xfs/xfs_file.o: in function `xfs_write_fault.constprop.0':
xfs_file.c:(.text.xfs_write_fault.constprop.0+0xc): undefined reference to `filemap_fsnotify_fault'

It's rather unlikely that anyone is using this combination,
so just add a Kconfig dependency.

Fixes: 436df5326f57 ("xfs: add pre-content fsnotify hook for write faults")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/xfs/Kconfig | 1 +
lib/Kconfig.debug | 1 +
2 files changed, 2 insertions(+)

diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
index fffd6fffdce0..1834932a512d 100644
--- a/fs/xfs/Kconfig
+++ b/fs/xfs/Kconfig
@@ -2,6 +2,7 @@
config XFS_FS
tristate "XFS filesystem support"
depends on BLOCK
+ depends on MMU
select EXPORTFS
select LIBCRC32C
select FS_IOMAP
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 7c0546480078..8906e2cd1ed5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2862,6 +2862,7 @@ config TEST_KMOD
depends on NETDEVICES && NET_CORE && INET # for TUN
depends on BLOCK
depends on PAGE_SIZE_LESS_THAN_256KB # for BTRFS
+ depends on MMU # for XFS_FS
select TEST_LKM
select XFS_FS
select TUN
--
2.39.2