Skip to content

Commit

Permalink
cls_cgroup: remove unneeded cgroup_lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and David S. Miller committed May 17, 2009
1 parent 3a6d54c commit cb1c4b7
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/sched/cls_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cb1c4b7

Please sign in to comment.