Re: [PATCH] mm: memfd_luo: add CONFIG_SHMEM dependency

From: Mike Rapoport

Date: Thu Dec 04 2025 - 06:01:10 EST


On Thu, Dec 04, 2025 at 11:01:58AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The new memfd code fails to link without SHMEM:
>
> aarch64-linux-ld: mm/memfd_luo.o: in function `memfd_luo_retrieve_folios':
> memfd_luo.c:(.text.memfd_luo_retrieve_folios+0xdc): undefined reference to `shmem_add_to_page_cache'
> memfd_luo.c:(.text.memfd_luo_retrieve_folios+0x11c): undefined reference to `shmem_inode_acct_blocks'
> memfd_luo.c:(.text.memfd_luo_retrieve_folios+0x134): undefined reference to `shmem_recalc_inode'
>
> Add a Kconfig dependency to disallow that configuration.
>
> Fixes: b3749f174d68 ("mm: memfd_luo: allow preserving memfd")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

--
Sincerely yours,
Mike.