diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-11-16 19:21:14 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-12-02 13:24:59 +0300 |
commit | d9a4af5690e26afa8a2eb83c575d3a9ef52cde1d (patch) | |
tree | 42dfbe9bc1d553682eb6c83b8a6e9cf93081fa41 /fs/proc | |
parent | 9e409c4778afbbd44759e56ec4bbed839fd31909 (diff) | |
download | linux-d9a4af5690e26afa8a2eb83c575d3a9ef52cde1d.tar.xz |
printk: Convert console_drivers list to hlist
Replace the open coded single linked list with a hlist so a conversion
to SRCU protected list walks can reuse the existing primitives.
Co-developed-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20221116162152.193147-3-john.ogness@linutronix.de
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/consoles.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c index dfe6ce3505ce..cf2e0788f9c7 100644 --- a/fs/proc/consoles.c +++ b/fs/proc/consoles.c @@ -74,8 +74,9 @@ static void *c_start(struct seq_file *m, loff_t *pos) static void *c_next(struct seq_file *m, void *v, loff_t *pos) { struct console *con = v; + ++*pos; - return con->next; + return hlist_entry_safe(con->node.next, struct console, node); } static void c_stop(struct seq_file *m, void *v) |