slab/slub: adjust kmem_cache_alloc_bulk API
[cascardo/linux.git] / mm / balloon_compaction.c
index fcad832..d3116be 100644 (file)
@@ -199,23 +199,17 @@ int balloon_page_migrate(struct page *newpage,
        struct balloon_dev_info *balloon = balloon_page_device(page);
        int rc = -EAGAIN;
 
-       /*
-        * Block others from accessing the 'newpage' when we get around to
-        * establishing additional references. We should be the only one
-        * holding a reference to the 'newpage' at this point.
-        */
-       BUG_ON(!trylock_page(newpage));
+       VM_BUG_ON_PAGE(!PageLocked(page), page);
+       VM_BUG_ON_PAGE(!PageLocked(newpage), newpage);
 
        if (WARN_ON(!__is_movable_balloon_page(page))) {
                dump_page(page, "not movable balloon page");
-               unlock_page(newpage);
                return rc;
        }
 
        if (balloon && balloon->migratepage)
                rc = balloon->migratepage(balloon, newpage, page, mode);
 
-       unlock_page(newpage);
        return rc;
 }
 #endif /* CONFIG_BALLOON_COMPACTION */