summaryrefslogtreecommitdiff
path: root/net/core/lock_debug.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-06-03 04:28:30 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-05 00:04:55 +0300
commit251bc9db88fb351ea2dfbd976c4e6aaae6507a91 (patch)
treebc40b516c3f37d5b9c9d5c3eab6f2c787087d514 /net/core/lock_debug.c
parent93790c374b9d77f3db15786d7d432872d92751cf (diff)
downloadlinux-251bc9db88fb351ea2dfbd976c4e6aaae6507a91.tar.xz
net: rename netdev_ops_assert_locked()
Jakub suggests renaming the existing assert to match the netdev_lock_ops_compat() semantics. We want netdev_assert_locked_ops() to mean - if the driver is ops locked - check that it's holding the device lock. The existing helper check for either ops lock or rtnl_lock, which is the locking behavior of netdev_lock_ops_compat(). The reason for naming divergence is likely that netdev_ops_assert_locked() predated the _compat() helpers. Suggested-by: Jakub Sitnicki <jakub@cloudflare.com> Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20260603012840.2254293-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/lock_debug.c')
-rw-r--r--net/core/lock_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/lock_debug.c b/net/core/lock_debug.c
index 9e9fb25314b9..14fd8fcdcd56 100644
--- a/net/core/lock_debug.c
+++ b/net/core/lock_debug.c
@@ -24,7 +24,7 @@ int netdev_debug_event(struct notifier_block *nb, unsigned long event,
case NETDEV_CHANGE:
case NETDEV_REGISTER:
case NETDEV_UP:
- netdev_ops_assert_locked(dev);
+ netdev_assert_locked_ops_compat(dev);
fallthrough;
case NETDEV_DOWN:
case NETDEV_REBOOT: