diff options
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 0576c0535988..3f1e0c2c942c 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -616,15 +616,13 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private, | |||
616 | /* | 616 | /* |
617 | * Establish migration ptes or remove ptes | 617 | * Establish migration ptes or remove ptes |
618 | */ | 618 | */ |
619 | if (try_to_unmap(page, 1) != SWAP_FAIL) { | 619 | try_to_unmap(page, 1); |
620 | if (!page_mapped(page)) | 620 | if (!page_mapped(page)) |
621 | rc = move_to_new_page(newpage, page); | 621 | rc = move_to_new_page(newpage, page); |
622 | } else | ||
623 | /* A vma has VM_LOCKED set -> permanent failure */ | ||
624 | rc = -EPERM; | ||
625 | 622 | ||
626 | if (rc) | 623 | if (rc) |
627 | remove_migration_ptes(page, page); | 624 | remove_migration_ptes(page, page); |
625 | |||
628 | unlock: | 626 | unlock: |
629 | unlock_page(page); | 627 | unlock_page(page); |
630 | 628 | ||