debug cgroup: remove unneeded cgroup_lock
authorLi Zefan <lizf@cn.fujitsu.com>
Thu, 2 Apr 2009 23:57:31 +0000 (16:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:04:54 +0000 (19:04 -0700)
Since we are in cgroup write handler, so the cgrp is valid, so we don't
have to hold cgroup_mutex when calling cgroup_task_count().  One similar
example is in cgroup_tasks_open().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cgroup_debug.c

index daca620..0c92d79 100644 (file)
@@ -40,9 +40,7 @@ static u64 taskcount_read(struct cgroup *cont, struct cftype *cft)
 {
        u64 count;
 
-       cgroup_lock();
        count = cgroup_task_count(cont);
-       cgroup_unlock();
        return count;
 }