diff options
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 449d77d409f5..112bcaeaa104 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -865,6 +865,11 @@ static int do_move_pages(struct mm_struct *mm, struct page_to_node *pm, | |||
865 | goto set_status; | 865 | goto set_status; |
866 | 866 | ||
867 | page = follow_page(vma, pp->addr, FOLL_GET); | 867 | page = follow_page(vma, pp->addr, FOLL_GET); |
868 | |||
869 | err = PTR_ERR(page); | ||
870 | if (IS_ERR(page)) | ||
871 | goto set_status; | ||
872 | |||
868 | err = -ENOENT; | 873 | err = -ENOENT; |
869 | if (!page) | 874 | if (!page) |
870 | goto set_status; | 875 | goto set_status; |
@@ -928,6 +933,11 @@ static int do_pages_stat(struct mm_struct *mm, struct page_to_node *pm) | |||
928 | goto set_status; | 933 | goto set_status; |
929 | 934 | ||
930 | page = follow_page(vma, pm->addr, 0); | 935 | page = follow_page(vma, pm->addr, 0); |
936 | |||
937 | err = PTR_ERR(page); | ||
938 | if (IS_ERR(page)) | ||
939 | goto set_status; | ||
940 | |||
931 | err = -ENOENT; | 941 | err = -ENOENT; |
932 | /* Use PageReserved to check for zero page */ | 942 | /* Use PageReserved to check for zero page */ |
933 | if (!page || PageReserved(page)) | 943 | if (!page || PageReserved(page)) |