aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 51c08a0c6f68..11072383ae12 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1388,14 +1388,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
1388 mm = get_task_mm(task); 1388 mm = get_task_mm(task);
1389 put_task_struct(task); 1389 put_task_struct(task);
1390 1390
1391 if (mm) { 1391 if (!mm)
1392 if (nodes) 1392 return -EINVAL;
1393 err = do_pages_move(mm, task_nodes, nr_pages, pages, 1393
1394 nodes, status, flags); 1394 if (nodes)
1395 else 1395 err = do_pages_move(mm, task_nodes, nr_pages, pages,
1396 err = do_pages_stat(mm, nr_pages, pages, status); 1396 nodes, status, flags);
1397 } else 1397 else
1398 err = -EINVAL; 1398 err = do_pages_stat(mm, nr_pages, pages, status);
1399 1399
1400 mmput(mm); 1400 mmput(mm);
1401 return err; 1401 return err;