Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1315538

[RFC][PATCH v3 3/4] printk: remove console_trylock_for_printk

From Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Newsgroups linux.kernel
Subject [RFC][PATCH v3 3/4] printk: remove console_trylock_for_printk
Date 2016-01-23 09:20 +0100
Message-ID <qU1Am-8nr-9@gated-at.bofh.it> (permalink)
References <qU1Al-8nr-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[RFC][PATCH v3 3/4] printk: remove console_trylock_for_printk Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-01-23 09:20 +0100

csiph-web