diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:09 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:35 +0100 |
commit | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (patch) | |
tree | 33c02b5e18e79756005a3edfa7c862a47de668d5 /mm/mempolicy.c | |
parent | 4086b1e2b19729eebf632073b9d4ab811726d8eb (diff) | |
parent | dc257cf154be708ecc47b8b89c12ad8cd2cc35e4 (diff) | |
download | blackbird-op-linux-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.tar.gz blackbird-op-linux-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.zip |
Merge branch 'for-airlied' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next
Daniel prepared this branch with a back-merge as git was getting
very confused about changes in intel_display.c
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index cfb6c8678754..b19569137529 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1361,11 +1361,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, mm = get_task_mm(task); put_task_struct(task); - if (mm) - err = do_migrate_pages(mm, old, new, - capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); - else + + if (!mm) { err = -EINVAL; + goto out; + } + + err = do_migrate_pages(mm, old, new, + capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); mmput(mm); out: |