summaryrefslogtreecommitdiffstats
path: root/net/core/dev_api.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-03-07 10:30:06 -0800
committerJakub Kicinski <kuba@kernel.org>2025-03-08 09:06:50 -0800
commit8ef890df4031121a94407c84659125cbccd3fdbe (patch)
tree3200b186f428a9dd37b0b7e9bd034cf8e32a9f9f /net/core/dev_api.c
parent9bfc9d65a1dc9ca2d45210ff4227517b460c19af (diff)
downloadlinux-8ef890df4031121a94407c84659125cbccd3fdbe.tar.gz
linux-8ef890df4031121a94407c84659125cbccd3fdbe.tar.bz2
linux-8ef890df4031121a94407c84659125cbccd3fdbe.zip
net: move misc netdev_lock flavors to a separate header
Move the more esoteric helpers for netdev instance lock to a dedicated header. This avoids growing netdevice.h to infinity and makes rebuilding the kernel much faster (after touching the header with the helpers). The main netdev_lock() / netdev_unlock() functions are used in static inlines in netdevice.h and will probably be used most commonly, so keep them in netdevice.h. Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250307183006.2312761-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev_api.c')
-rw-r--r--net/core/dev_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dev_api.c b/net/core/dev_api.c
index 655a95fb7baa..1f0e24849bc6 100644
--- a/net/core/dev_api.c
+++ b/net/core/dev_api.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
+
#include <linux/netdevice.h>
+#include <net/netdev_lock.h>
#include "dev.h"