Message ID | 20180418121255.334-1-mhocko@kernel.org |
---|---|
State | Not Applicable |
Delegated to: | Cyril Hrubis |
Headers | show |
Series | mm: Fix do_pages_move status handling | expand |
diff --git a/mm/migrate.c b/mm/migrate.c index 507cf9ba21bf..c7e5f6447417 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1634,6 +1634,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, current_node = NUMA_NO_NODE; } out_flush: + if (list_empty(&pagelist)) + return err; + /* Make sure we do not overwrite the existing error */ err1 = do_move_pages_to_node(mm, &pagelist, current_node); if (!err1)