From c640c6b5048abd38092c4ab4cd6de0b140900375 Mon Sep 17 00:00:00 2001 From: Paul Jackson Date: Wed, 6 Dec 2006 20:36:15 -0800 Subject: [PATCH] --- yaml --- r: 42787 b: refs/heads/master c: 696040670a12f66b17a839011f96d9ca376f688b h: refs/heads/master i: 42785: e769da08d9f4caebda003b22c6f07c97e1d23e4f 42783: ba7bbc3d3331011ac153a2548257ae820109a03b v: v3 --- [refs] | 2 +- trunk/kernel/cpuset.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 1af61e2ef3f2..37eae8ca464c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5ec68b2e310437e99c297ba04e1afc5297aa6de1 +refs/heads/master: 696040670a12f66b17a839011f96d9ca376f688b diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index 6313c38c930e..bd1e89c4c96a 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -729,9 +729,11 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial) } /* Remaining checks don't apply to root cpuset */ - if ((par = cur->parent) == NULL) + if (cur == &top_cpuset) return 0; + par = cur->parent; + /* We must be a subset of our parent cpuset */ if (!is_cpuset_subset(trial, par)) return -EACCES; @@ -1060,10 +1062,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, char *buf) cpu_exclusive_changed = (is_cpu_exclusive(cs) != is_cpu_exclusive(&trialcs)); mutex_lock(&callback_mutex); - if (turning_on) - set_bit(bit, &cs->flags); - else - clear_bit(bit, &cs->flags); + cs->flags = trialcs.flags; mutex_unlock(&callback_mutex); if (cpu_exclusive_changed)