diff options
author | Mandeep Singh Baines <[email protected]> | 2012-01-03 21:18:30 -0800 |
---|---|---|
committer | Tejun Heo <[email protected]> | 2012-01-20 15:58:13 -0800 |
commit | b78949ebfb563c29808a9d0a772e3adb5561bc80 (patch) | |
tree | d5b473db418a7480d314ffe36d428290d3603bfc /tools/perf/scripts/python/sctop.py | |
parent | 245282557c49754af3dbcc732316e814340d6bce (diff) |
cgroup: simplify double-check locking in cgroup_attach_proc
To keep the complexity of the double-check locking in one place, move
the thread_group_leader check up into attach_task_by_pid(). This
allows us to use a goto instead of returning -EAGAIN.
While at it, convert a couple of returns to gotos and use rcu for the
!pid case also in order to simplify the logic.
Changes in V2:
* https://lkml.org/lkml/2011/12/22/86 (Tejun Heo)
* Use a goto instead of returning -EAGAIN
Signed-off-by: Mandeep Singh Baines <[email protected]>
Acked-by: Li Zefan <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Paul Menage <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions