summaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-16 02:56:07 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-11-16 02:56:07 +0100
commit77ed78e5cf32be1c3fae5c477cc1d78e2e3f17db (patch)
tree805db8c5c180ee7ee85b3c484461100c91f6c781 /kernel/cpuset.c
parentMerge branch 'upstream-fixes' (diff)
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-77ed78e5cf32be1c3fae5c477cc1d78e2e3f17db.tar.xz
linux-77ed78e5cf32be1c3fae5c477cc1d78e2e3f17db.zip
Merge branch 'master'
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 5a737ed9dac7..7430640f9816 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1809,11 +1809,12 @@ int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
if (gfp_mask & __GFP_HARDWALL) /* If hardwall request, stop here */
return 0;
+ if (current->flags & PF_EXITING) /* Let dying task have memory */
+ return 1;
+
/* Not hardwall and node outside mems_allowed: scan up cpusets */
down(&callback_sem);
- if (current->flags & PF_EXITING) /* Let dying task have memory */
- return 1;
task_lock(current);
cs = nearest_exclusive_ancestor(current->cpuset);
task_unlock(current);