diff options
-rw-r--r-- | mm/huge_memory.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index dc0a0c82a5ac..503c8e1aecc6 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2307,6 +2307,7 @@ static void unmap_page(struct page *page) VM_BUG_ON_PAGE(!PageHead(page), page); + /* If TTU_SPLIT_FREEZE is ever extended to file, update remap_page() */ if (PageAnon(page)) ttu_flags |= TTU_SPLIT_FREEZE; @@ -2318,6 +2319,10 @@ static void unmap_page(struct page *page) static void remap_page(struct page *page, unsigned int nr) { int i; + + /* If TTU_SPLIT_FREEZE is ever extended to file, remove this check */ + if (!PageAnon(page)) + return; if (PageTransHuge(page)) { remove_migration_ptes(page, page, true); } else { |