On 2025/1/6 11:17, Barry Song wrote:
From: Barry Song <v-songbaohua@xxxxxxxx> The refcount may be temporarily or long-term increased, but this does not change the fundamental nature of the folio already being lazy- freed. Therefore, we only reset 'swapbacked' when we are certain the folio is dirty and not droppable. Suggested-by: David Hildenbrand <david@xxxxxxxxxx> Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
The changes look good to me. While we are at it, could you also change the __discard_anon_folio_pmd_locked() to follow the same strategy for lazy-freed PMD-sized folio?