Skip to content

Commit

Permalink
debug cgroup: remove unneeded cgroup_lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and torvalds committed Apr 3, 2009
1 parent 0670e08 commit d969fbe
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/cgroup_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d969fbe

Please sign in to comment.