From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Dhaval Giani <dhaval@linux.vnet.ibm.com>,
Paul Menage <menage@google.com>, Li Zefan <lizf@cn.fujitsu.com>
Subject: [PATCH mmotm] cgroup: remove rcu_read_lock() from css_get_next()
Date: Wed, 4 Mar 2009 09:59:20 +0530 [thread overview]
Message-ID: <20090304042920.GA4508@in.ibm.com> (raw)
cgroup: remove rcu_read_lock() from css_get_next()
Callers of css_get_next() are already calling css_get_next()
under rcu_read_lock() and hence there there is no need for
css_get_next() to re-acquire rcu_read_lock(). As per the
comments in css_get_next(), let the callers accquire the
rcu_read_lock().
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
kernel/cgroup.c | 3 ---
1 file changed, 3 deletions(-)
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3553,7 +3553,6 @@ css_get_next(struct cgroup_subsys *ss, i
return NULL;
BUG_ON(!ss->use_id);
- rcu_read_lock();
/* fill start point for scan */
tmpid = id;
while (1) {
@@ -3577,8 +3576,6 @@ css_get_next(struct cgroup_subsys *ss, i
/* continue to scan from next id */
tmpid = tmpid + 1;
}
-
- rcu_read_unlock();
return ret;
}
Regards,
Bharata.
next reply other threads:[~2009-03-04 4:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 4:29 Bharata B Rao [this message]
2009-03-04 4:29 ` [PATCH mmotm] cgroup: remove rcu_read_lock() from css_get_next() KAMEZAWA Hiroyuki
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=20090304042920.GA4508@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=dhaval@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--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