From d0f32a33a33b2a78f61d51a129e5698e175f71a9 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Fri, 4 Mar 2011 17:36:21 -0800 Subject: [PATCH] --- yaml --- r: 233916 b: refs/heads/master c: b75f38d659e6fc747eda64cb72f3920e29dd44a4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/cpuset.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 4c9a7e7e0790..900d862c621a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ec38a0359e227c01080dcd670a0368c61ccd9ce +refs/heads/master: b75f38d659e6fc747eda64cb72f3920e29dd44a4 diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index 4349935c2ad8..e92e98189032 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -1575,8 +1575,10 @@ static int cpuset_write_resmask(struct cgroup *cgrp, struct cftype *cft, return -ENODEV; trialcs = alloc_trial_cpuset(cs); - if (!trialcs) - return -ENOMEM; + if (!trialcs) { + retval = -ENOMEM; + goto out; + } switch (cft->private) { case FILE_CPULIST: @@ -1591,6 +1593,7 @@ static int cpuset_write_resmask(struct cgroup *cgrp, struct cftype *cft, } free_trial_cpuset(trialcs); +out: cgroup_unlock(); return retval; }