Re: [PATCH RFC 06/13] mm/huge_memory: move EOF trimming into the file split helper
From: Zi Yan
Date: Sat Aug 08 2026 - 21:59:18 EST
On Fri Aug 7, 2026 at 5:17 PM EDT, Kairui Song via B4 Relay wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> Instead of receiving @end and @nr_shmem_dropped from the caller, the
> file split helper now computes the EOF boundary and trims pages beyond
> it itself, as this is only needed for file split. This drops the
> redundant parameter passing and sanity check.
And the end calculation is done under i_mmap_lock_read() already, move
it inside the locked region should not change code behavior.
>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
> ---
> mm/huge_memory.c | 42 +++++++++++++++++++-----------------------
> 1 file changed, 19 insertions(+), 23 deletions(-)
>
Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi