public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	Paul Menage <menage@google.com>
Subject: Re: [PATCH] cpuset: fix return value of cpuset_populate()
Date: Wed, 27 Feb 2008 01:41:35 -0600	[thread overview]
Message-ID: <20080227014135.0c361ab3.pj@sgi.com> (raw)
In-Reply-To: <47C5131A.80508@cn.fujitsu.com>

[Resending a patch that Li Zefan just sent, adding the other Paul (Menage)
 to the CC list.  -pj]

- no need to check err == 0
- the last return value of cgroup_add_file() is ignored

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/cpuset.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 3e296ed..1c5b2d2 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1482,10 +1482,10 @@ static int cpuset_populate(struct cgroup_subsys *ss, struct cgroup *cont)
 	if ((err = cgroup_add_file(cont, ss, &cft_spread_slab)) < 0)
 		return err;
 	/* memory_pressure_enabled is in root cpuset only */
-	if (err == 0 && !cont->parent)
+	if (!cont->parent)
 		err = cgroup_add_file(cont, ss,
 					 &cft_memory_pressure_enabled);
-	return 0;
+	return err;
 }
 
 /*
-- 
1.5.4.rc3


-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214

  reply	other threads:[~2008-02-27  7:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27  7:36 [PATCH] cpuset: fix return value of cpuset_populate() Li Zefan
2008-02-27  7:41 ` Paul Jackson [this message]
2008-02-27  7:46   ` Li Zefan
2008-02-28  0:49   ` Paul Menage
2008-02-28  1:06     ` Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080227014135.0c361ab3.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox