mempolicy.c (57b8628bb0ac4e47c806e45c5bbd89282e93869b) | mempolicy.c (f2a9ef880763d7fbd657a3af646e132a90d70d34) |
---|---|
1/* 2 * Simple NUMA memory policy for the Linux kernel. 3 * 4 * Copyright 2003,2004 Andi Kleen, SuSE Labs. 5 * (C) Copyright 2005 Christoph Lameter, Silicon Graphics, Inc. 6 * Subject to the GNU Public License, version 2. 7 * 8 * NUMA policy allows the user to give hints in which node(s) memory should --- 1347 unchanged lines hidden (view full) --- 1356 } 1357 1358 err = security_task_movememory(task); 1359 if (err) 1360 goto out_put; 1361 1362 mm = get_task_mm(task); 1363 put_task_struct(task); | 1/* 2 * Simple NUMA memory policy for the Linux kernel. 3 * 4 * Copyright 2003,2004 Andi Kleen, SuSE Labs. 5 * (C) Copyright 2005 Christoph Lameter, Silicon Graphics, Inc. 6 * Subject to the GNU Public License, version 2. 7 * 8 * NUMA policy allows the user to give hints in which node(s) memory should --- 1347 unchanged lines hidden (view full) --- 1356 } 1357 1358 err = security_task_movememory(task); 1359 if (err) 1360 goto out_put; 1361 1362 mm = get_task_mm(task); 1363 put_task_struct(task); |
1364 if (mm) 1365 err = do_migrate_pages(mm, old, new, 1366 capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); 1367 else | 1364 1365 if (!mm) { |
1368 err = -EINVAL; | 1366 err = -EINVAL; |
1367 goto out; 1368 } |
|
1369 | 1369 |
1370 err = do_migrate_pages(mm, old, new, 1371 capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); 1372 |
|
1370 mmput(mm); 1371out: 1372 NODEMASK_SCRATCH_FREE(scratch); 1373 1374 return err; 1375 1376out_put: 1377 put_task_struct(task); --- 1197 unchanged lines hidden --- | 1373 mmput(mm); 1374out: 1375 NODEMASK_SCRATCH_FREE(scratch); 1376 1377 return err; 1378 1379out_put: 1380 put_task_struct(task); --- 1197 unchanged lines hidden --- |