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:
parent
3a6d54c563
commit
cb1c4b71f6
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue