From: akpm@linux-foundation.org
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org,
lizf@cn.fujitsu.com, lizf@cn.fujitsuc.com, menage@google.com
Subject: [patch 1/2] cls_cgroup: remove unneeded cgroup_lock
Date: Tue, 12 May 2009 13:47:33 -0700 [thread overview]
Message-ID: <200905122106.n4CL6ndX009858@imap1.linux-foundation.org> (raw)
From: Li Zefan <lizf@cn.fujitsu.com>
We can remove this lock here, since we are in cgroup write handler and
thus the cgrp is guaranteed to be valid, and no lock is needed when
writing a u32 variable.
Signed-off-by: Li Zefan <lizf@cn.fujitsuc.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
net/sched/cls_cgroup.c | 6 ------
1 file changed, 6 deletions(-)
diff -puN net/sched/cls_cgroup.c~cls_cgroup-remove-unneeded-cgroup_lock net/sched/cls_cgroup.c
--- a/net/sched/cls_cgroup.c~cls_cgroup-remove-unneeded-cgroup_lock
+++ a/net/sched/cls_cgroup.c
@@ -62,13 +62,7 @@ static u64 read_classid(struct cgroup *c
static int write_classid(struct cgroup *cgrp, struct cftype *cft, u64 value)
{
- if (!cgroup_lock_live_group(cgrp))
- return -ENODEV;
-
cgrp_cls_state(cgrp)->classid = (u32) value;
-
- cgroup_unlock();
-
return 0;
}
_
next reply other threads:[~2009-05-12 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 20:47 akpm [this message]
2009-05-17 20:58 ` [patch 1/2] cls_cgroup: remove unneeded cgroup_lock David Miller
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=200905122106.n4CL6ndX009858@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=lizf@cn.fujitsu.com \
--cc=lizf@cn.fujitsuc.com \
--cc=menage@google.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).