summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/migrate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index f65dd69e1fd1..70ef794cccae 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1622,6 +1622,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)