From: John Ogness Date: Wed, 4 Sep 2024 12:05:31 +0000 (+0206) Subject: proc: consoles: Add notation to c_start/c_stop X-Git-Tag: v6.12-rc1~192^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe6fa88d865e9c1a41b41f92ae0531470c86f0da;p=thirdparty%2Fkernel%2Flinux.git proc: consoles: Add notation to c_start/c_stop fs/proc/consoles.c:78:13: warning: context imbalance in 'c_start' - wrong count at exit fs/proc/consoles.c:104:13: warning: context imbalance in 'c_stop' - unexpected unlock Signed-off-by: John Ogness Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20240904120536.115780-13-john.ogness@linutronix.de Signed-off-by: Petr Mladek --- diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c index e0758fe7936dc..7036fdfa0becb 100644 --- a/fs/proc/consoles.c +++ b/fs/proc/consoles.c @@ -68,6 +68,7 @@ static int show_console_dev(struct seq_file *m, void *v) } static void *c_start(struct seq_file *m, loff_t *pos) + __acquires(&console_mutex) { struct console *con; loff_t off = 0; @@ -94,6 +95,7 @@ static void *c_next(struct seq_file *m, void *v, loff_t *pos) } static void c_stop(struct seq_file *m, void *v) + __releases(&console_mutex) { console_list_unlock(); }