diff options
author | Hugh Dickins <hughd@google.com> | 2024-07-06 23:29:00 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-07-13 00:52:21 +0200 |
commit | a5ea521250afdf3d70c72970660f44aebf56ea19 (patch) | |
tree | eee0f4fab0dfedbdc6da309966f9bbea9a15eabf /mm | |
parent | mm/page_alloc: put __free_pages_core() in __meminit section (diff) | |
download | linux-a5ea521250afdf3d70c72970660f44aebf56ea19.tar.xz linux-a5ea521250afdf3d70c72970660f44aebf56ea19.zip |
mm: simplify folio_migrate_mapping()
Now that folio_undo_large_rmappable() is an inline function checking
order and large_rmappable for itself (and __folio_undo_large_rmappable()
is now declared even when CONFIG_TRANASPARENT_HUGEPAGE is off) there is
no need for folio_migrate_mapping() to check large and large_rmappable
first (in the mapping case when it has had to freeze anyway).
Link: https://lkml.kernel.org/r/68feee73-050e-8e98-7a3a-abf78738d92c@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index ff512c43fecb..6eb9df239230 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -438,8 +438,7 @@ static int __folio_migrate_mapping(struct address_space *mapping, } /* Take off deferred split queue while frozen and memcg set */ - if (folio_test_large(folio) && folio_test_large_rmappable(folio)) - folio_undo_large_rmappable(folio); + folio_undo_large_rmappable(folio); /* * Now we know that no one else is looking at the folio: |