summaryrefslogtreecommitdiff
path: root/tools/testing/shared
diff options
context:
space:
mode:
authoryangge <yangge1116@126.com>2024-08-13 17:52:23 +0800
committerAndrew Morton <akpm@linux-foundation.org>2024-09-01 20:26:10 -0700
commit67b9a353e171c3969223e53308feb15b722bb64a (patch)
treed923293b7295602f02a91d9d478454173f85ca7c /tools/testing/shared
parentb6273b55d88539c6a7127a697c61d3f89c5831fe (diff)
mm/swap: take folio refcount after testing the LRU flag
Whoever passes a folio to __folio_batch_add_and_move() must hold a reference, otherwise something else would already be messed up. If the folio is referenced, it will not be freed elsewhere, so we can safely clear the folio's lru flag. As discussed with David in [1], we should take the reference after testing the LRU flag, not before. Link: https://lore.kernel.org/lkml/d41865b4-d6fa-49ba-890a-921eefad27dd@redhat.com/ [1] Link: https://lkml.kernel.org/r/1723542743-32179-1-git-send-email-yangge1116@126.com Signed-off-by: yangge <yangge1116@126.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Yu Zhao <yuzhao@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing/shared')
0 files changed, 0 insertions, 0 deletions