Re: [PATCH v4 4/7] mm: memory_failure: Generalize extra_pins handling to all MF_DELAYED cases

From: Miaohe Lin

Date: Tue Jun 09 2026 - 04:08:24 EST


On 2026/6/3 5:55, Lisa Wang wrote:
> Generalize extra_pins handling to all MF_DELAYED cases not only
> shmem_mapping.
>
> If MF_DELAYED is returned, the filemap continues to hold refcounts on the
> folio. Hence, take that into account when checking for extra refcounts.
>
> As clarified in an earlier patch, a return value of MF_DELAYED implies that
> the page still has elevated refcounts. Hence, set extra_pins to true if the
> return value is MF_DELAYED. This is aligned with the implementation in
> me_swapcache_dirty(), where, if a folio is still in the swap cache, ret is
> set to MF_DELAYED and extra_pins is set to true.
>
> Signed-off-by: Lisa Wang <wyihan@xxxxxxxxxx>

Acked-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>

Thanks.
.