]> Pileus Git - ~andy/linux/blobdiff - mm/migrate.c
mm/readahead.c: fix do_readahead() for no readpage(s)
[~andy/linux] / mm / migrate.c
index a8025befc32363ce37400a38710c8b87b7b38779..482a33d89134fd83e15d5f6863dae57f5cb05aac 100644 (file)
@@ -499,7 +499,7 @@ void migrate_page_copy(struct page *newpage, struct page *page)
        if (PageUptodate(page))
                SetPageUptodate(newpage);
        if (TestClearPageActive(page)) {
-               VM_BUG_ON(PageUnevictable(page));
+               VM_BUG_ON_PAGE(PageUnevictable(page), page);
                SetPageActive(newpage);
        } else if (TestClearPageUnevictable(page))
                SetPageUnevictable(newpage);
@@ -871,7 +871,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
         * free the metadata, so the page can be freed.
         */
        if (!page->mapping) {
-               VM_BUG_ON(PageAnon(page));
+               VM_BUG_ON_PAGE(PageAnon(page), page);
                if (page_has_private(page)) {
                        try_to_free_buffers(page);
                        goto uncharge;
@@ -1548,8 +1548,6 @@ static struct page *alloc_misplaced_dst_page(struct page *page,
                                          __GFP_NOMEMALLOC | __GFP_NORETRY |
                                          __GFP_NOWARN) &
                                         ~GFP_IOFS, 0);
-       if (newpage)
-               page_cpupid_xchg_last(newpage, page_cpupid_last(page));
 
        return newpage;
 }
@@ -1618,7 +1616,7 @@ static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page)
 {
        int page_lru;
 
-       VM_BUG_ON(compound_order(page) && !PageTransHuge(page));
+       VM_BUG_ON_PAGE(compound_order(page) && !PageTransHuge(page), page);
 
        /* Avoid migrating to a node that is nearly full */
        if (!migrate_balanced_pgdat(pgdat, 1UL << compound_order(page)))
@@ -1753,8 +1751,6 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
        if (!new_page)
                goto out_fail;
 
-       page_cpupid_xchg_last(new_page, page_cpupid_last(page));
-
        isolated = numamigrate_isolate_page(pgdat, page);
        if (!isolated) {
                put_page(new_page);