Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d969fbe6 authored by Li Zefan's avatar Li Zefan Committed by Linus Torvalds
Browse files

debug cgroup: remove unneeded cgroup_lock



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: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarPaul Menage <menage@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0670e08b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
}