[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210218081817.28849-14-john.ogness@linutronix.de>
Date: Thu, 18 Feb 2021 09:18:16 +0100
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: [PATCH printk-rework 13/14] printk: kmsg_dump: use kmsg_dump_rewind
kmsg_dump() is open coding the kmsg_dump_rewind(). Call
kmsg_dump_rewind() instead.
Signed-off-by: John Ogness <john.ogness@...utronix.de>
---
kernel/printk/printk.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 744b806d5457..23d525e885e7 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3347,7 +3347,6 @@ void kmsg_dump(enum kmsg_dump_reason reason)
{
struct kmsg_dumper_iter iter;
struct kmsg_dumper *dumper;
- unsigned long flags;
rcu_read_lock();
list_for_each_entry_rcu(dumper, &dump_list, list) {
@@ -3366,10 +3365,7 @@ void kmsg_dump(enum kmsg_dump_reason reason)
/* initialize iterator with data about the stored records */
iter.active = true;
- printk_safe_enter_irqsave(flags);
- iter.cur_seq = latched_seq_read_nolock(&clear_seq);
- iter.next_seq = prb_next_seq(prb);
- printk_safe_exit_irqrestore(flags);
+ kmsg_dump_rewind(&iter);
/* invoke dumper which will iterate over records */
dumper->dump(dumper, reason, &iter);
--
2.20.1
Powered by blists - more mailing lists