Messages in this thread Patch in this message | | | From | Sergey Senozhatsky <> | Subject | [RFC][PATCH v3 3/4] printk: remove console_trylock_for_printk | Date | Sat, 23 Jan 2016 17:15:12 +0900 |
| |
Remove console_trylock_for_printk() function, it can be replaced with console_trylock() in vprintk_emit().
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> --- kernel/printk/printk.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index dc722fc..99925ce 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1484,17 +1484,6 @@ static void zap_locks(void) sema_init(&console_sem, 1); } -/* - * Try to get console ownership to actually show the kernel - * messages from a 'printk'. Return true (and with the - * console_lock held, and 'console_locked' set) if it - * is successful, false otherwise. - */ -static int console_trylock_for_printk(void) -{ - return console_trylock(); -} - int printk_delay_msec __read_mostly; static inline void printk_delay(void) @@ -1791,7 +1780,7 @@ asmlinkage int vprintk_emit(int facility, int level, * semaphore. The release will print out buffers and wake up * /dev/kmsg and syslog() users. */ - if (console_trylock_for_printk()) + if (console_trylock()) console_unlock(); preempt_enable(); lockdep_on(); -- 2.7.0
| |