]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/balloon_compaction.c
fs/ncpfs/dir.c: remove unnecessary new_valid_dev() check
[karo-tx-linux.git] / mm / balloon_compaction.c
index fcad8322ef36781c5c59e92ddee26caeb4c3c5f2..d3116be5a00fa51646b5a0b45683a138a4ed3f7c 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 */