Lines Matching refs:expected_count
359 int expected_count = 1; in expected_page_refs() local
365 expected_count += is_device_private_page(page); in expected_page_refs()
367 expected_count += compound_nr(page) + page_has_private(page); in expected_page_refs()
369 return expected_count; in expected_page_refs()
386 int expected_count = expected_page_refs(mapping, &folio->page) + extra_count; in folio_migrate_mapping() local
391 if (folio_ref_count(folio) != expected_count) in folio_migrate_mapping()
407 if (!folio_ref_freeze(folio, expected_count)) { in folio_migrate_mapping()
451 folio_ref_unfreeze(folio, expected_count - nr); in folio_migrate_mapping()
507 int expected_count; in migrate_huge_page_move_mapping() local
510 expected_count = 2 + page_has_private(page); in migrate_huge_page_move_mapping()
511 if (page_count(page) != expected_count || xas_load(&xas) != page) { in migrate_huge_page_move_mapping()
516 if (!page_ref_freeze(page, expected_count)) { in migrate_huge_page_move_mapping()
528 page_ref_unfreeze(page, expected_count - 1); in migrate_huge_page_move_mapping()
696 int expected_count; in __buffer_migrate_page() local
702 expected_count = expected_page_refs(mapping, page); in __buffer_migrate_page()
703 if (page_count(page) != expected_count) in __buffer_migrate_page()