diff --git a/mm/migrate.c b/mm/migrate.c index f65dd69e1fd1a7a1dd7c88679ae8aacabe19aacc..70ef794cccae97feda86c34e54b961eaa120138e 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)