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 <[email protected]>
Acked-by: Paul Menage <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Li Zefan 2009-05-12 10:47:33 +00:00 • committed by David S. Miller
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;
}