Re: [PATCH] mm: huge_memory: don't force huge page alignment on 32 bit
From: Matthew Wilcox
Date: Thu Jul 11 2024 - 16:50:43 EST
On Thu, Jul 11, 2024 at 01:47:00PM -0700, Yang Shi wrote:
> +++ b/mm/huge_memory.c
> @@ -857,7 +857,8 @@ static unsigned long
> __thp_get_unmapped_area(struct file *filp,
> loff_t off_align = round_up(off, size);
> unsigned long len_pad, ret, off_sub;
>
> - if (IS_ENABLED(CONFIG_32BIT) || in_compat_syscall())
> + if (IS_ENABLED(CONFIG_32BIT) || IS_ENABLED(CONFIG_X86_32) ||
> + in_compat_syscall())
Why not:
if (!IS_ENABLED(CONFIG_64BIT) || in_compat_syscall())