diff options
author | Jan Kara <[email protected]> | 2014-06-04 16:11:35 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-06-04 16:54:16 -0700 |
commit | 608873cacb9d0d2811586fcc79a38b64eabd6d32 (patch) | |
tree | a72babb6839139ec4aaefcacc2fa19690c668414 /tools/perf/scripts/python/check-perf-trace.py | |
parent | ca1d432ad8a527fabc5c7ceed8526e3a28de121c (diff) |
printk: release lockbuf_lock before calling console_trylock_for_printk()
There's no reason to hold lockbuf_lock when entering
console_trylock_for_printk().
The first thing this function does is to call down_trylock(console_sem)
and if that fails it immediately unlocks lockbuf_lock. So lockbuf_lock
isn't needed for that branch. When down_trylock() succeeds, the rest of
console_trylock() is OK without lockbuf_lock (it is called without it
from other places), and the only remaining thing in
console_trylock_for_printk() is can_use_console() call. For that call
console_sem is enough (it iterates all consoles and checks CON_ANYTIME
flag).
So we drop logbuf_lock before entering console_trylock_for_printk() which
simplifies the code.
[[email protected]: fix have_callable_console() comment]
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions