lkml.org 
[lkml]   [2016]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC][PATCH v3 3/4] printk: remove console_trylock_for_printk
Date
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
\
 
 \ /
  Last update: 2016-01-23 09:41    [W:0.218 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site