cls_cgroup: remove unneeded cgroup_lock

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Li Zefan 2009-05-12 10:47:33 +00:00 committed by David S. Miller
parent 3a6d54c563
commit cb1c4b71f6

View File

@ -62,13 +62,7 @@ static u64 read_classid(struct cgroup *cgrp, struct cftype *cft)
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;
}