Commit cb1c4b71 authored by Li Zefan's avatar Li Zefan Committed by David S. Miller

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: default avatarLi Zefan <lizf@cn.fujitsuc.com>
Acked-by: default avatarPaul Menage <menage@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a6d54c5
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment