Re: [PATCH v4 4/4] mm/truncate: clarify return value of truncate_inode_partial_folio()
From: Zi Yan
Date: Tue Sep 22 2026 - 13:33:18 EST
On Tue Sep 22, 2026 at 7:07 AM EDT, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@xxxxxxxxxx>
>
> With the earlier rework the callers no longer rely on the return value
> of truncate_inode_partial_folio() to decide whether to adjust the
> truncation range. The pstart/pend out-parameters carry that information
> instead. The callers now only use the return value as a flag indicating
> whether the loop should be reset to pick up newly split sub-folios on
> the shmem path.
>
> Return true if at least one split succeeded, and false otherwise.
> This clarifies the existing confusing return value semantics.
>
> Signed-off-by: Zhang Yi <yi.zhang@xxxxxxxxxx>
> ---
> mm/truncate.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
Thanks.
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi