aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 153572fb60b8..2a80136b23bb 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -605,7 +605,7 @@ static int move_to_new_page(struct page *newpage, struct page *page)
605 * establishing additional references. We are the only one 605 * establishing additional references. We are the only one
606 * holding a reference to the new page at this point. 606 * holding a reference to the new page at this point.
607 */ 607 */
608 if (TestSetPageLocked(newpage)) 608 if (!trylock_page(newpage))
609 BUG(); 609 BUG();
610 610
611 /* Prepare mapping for the new page.*/ 611 /* Prepare mapping for the new page.*/
@@ -667,7 +667,7 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
667 BUG_ON(charge); 667 BUG_ON(charge);
668 668
669 rc = -EAGAIN; 669 rc = -EAGAIN;
670 if (TestSetPageLocked(page)) { 670 if (!trylock_page(page)) {
671 if (!force) 671 if (!force)
672 goto move_newpage; 672 goto move_newpage;
673 lock_page(page); 673 lock_page(page);