]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netconsole: introduce helpers for dynamic_netconsole_mutex lock/unlock
authorAndre Carvalho <asantostc@gmail.com>
Sun, 18 Jan 2026 11:00:25 +0000 (11:00 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Jan 2026 03:09:11 +0000 (19:09 -0800)
commitc52861e566db8af86c9fb412ccffa274c610babf
treeb9b08d9ec66d51e5d40a2469a5918f8de518f883
parent5b114087438dcd229c8754c093c44619c346d67c
netconsole: introduce helpers for dynamic_netconsole_mutex lock/unlock

This commit introduces two helper functions to perform lock/unlock on
dynamic_netconsole_mutex providing no-op stub versions when compiled
without CONFIG_NETCONSOLE_DYNAMIC and refactors existing call sites to
use the new helpers.

This is done following kernel coding style guidelines, in preparation
for an upcoming change. It avoids the need for preprocessor conditionals
in the call site and keeps the logic easier to follow.

Signed-off-by: Andre Carvalho <asantostc@gmail.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Tested-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260118-netcons-retrigger-v11-5-4de36aebcf48@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netconsole.c