]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cls_cgroup: remove unneeded cgroup_lock
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 12 May 2009 10:47:33 +0000 (10:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 May 2009 18:59:48 +0000 (11:59 -0700)
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>
net/sched/cls_cgroup.c

index 91a3db4a76f837ae88d28d65012c073f5049ac61..1ab4542e61e0334162efe740ab96b05b4c5dae1c 100644 (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;
 }