]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/migrate.c
Merge tag 'upstream-4.3-rc4' of git://git.infradead.org/linux-ubifs
[karo-tx-linux.git] / mm / migrate.c
index 02ce25df16c26476dd6a44528e6ff765a8442f5e..7452a00bbb50c134b529c1d024dfc53fcfca093b 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/gfp.h>
 #include <linux/balloon_compaction.h>
 #include <linux/mmu_notifier.h>
+#include <linux/page_idle.h>
 
 #include <asm/tlbflush.h>
 
@@ -524,6 +525,11 @@ void migrate_page_copy(struct page *newpage, struct page *page)
                        __set_page_dirty_nobuffers(newpage);
        }
 
+       if (page_is_young(page))
+               set_page_young(newpage);
+       if (page_is_idle(page))
+               set_page_idle(newpage);
+
        /*
         * Copy NUMA information to the new page, to prevent over-eager
         * future migrations of this same page.
@@ -1069,7 +1075,7 @@ out:
        if (rc != MIGRATEPAGE_SUCCESS && put_new_page)
                put_new_page(new_hpage, private);
        else
-               put_page(new_hpage);
+               putback_active_hugepage(new_hpage);
 
        if (result) {
                if (rc)