diff options
author | 2025-03-07 10:30:06 -0800 | |
---|---|---|
committer | 2025-03-08 09:06:50 -0800 | |
commit | 8ef890df4031121a94407c84659125cbccd3fdbe (patch) | |
tree | 3200b186f428a9dd37b0b7e9bd034cf8e32a9f9f /net/core | |
parent | hamradio: use netdev_lockdep_set_classes() helper (diff) | |
download | linux-rng-8ef890df4031121a94407c84659125cbccd3fdbe.tar.xz linux-rng-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')
-rw-r--r-- | net/core/dev.c | 1 | ||||
-rw-r--r-- | net/core/dev.h | 1 | ||||
-rw-r--r-- | net/core/dev_api.c | 2 | ||||
-rw-r--r-- | net/core/dev_ioctl.c | 1 | ||||
-rw-r--r-- | net/core/net-sysfs.c | 1 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 1 |
6 files changed, 7 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index a0f75a1d1f5a..1cb134ff7327 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -156,6 +156,7 @@ #include <linux/pm_runtime.h> #include <linux/prandom.h> #include <linux/once_lite.h> +#include <net/netdev_lock.h> #include <net/netdev_rx_queue.h> #include <net/page_pool/types.h> #include <net/page_pool/helpers.h> diff --git a/net/core/dev.h b/net/core/dev.h index b50ca645c086..0ddd3631acb0 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -6,6 +6,7 @@ #include <linux/types.h> #include <linux/rwsem.h> #include <linux/netdevice.h> +#include <net/netdev_lock.h> struct net; struct netlink_ext_ack; 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" diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 296e52d1395d..5471cf4fc984 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -10,6 +10,7 @@ #include <linux/wireless.h> #include <linux/if_bridge.h> #include <net/dsa_stubs.h> +#include <net/netdev_lock.h> #include <net/wext.h> #include "dev.h" diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 02d1d40b47ae..529a0f721268 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -23,6 +23,7 @@ #include <linux/of.h> #include <linux/of_net.h> #include <linux/cpu.h> +#include <net/netdev_lock.h> #include <net/netdev_rx_queue.h> #include <net/rps.h> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 88a352b02bce..90597bf84e3d 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -53,6 +53,7 @@ #include <net/fib_rules.h> #include <net/rtnetlink.h> #include <net/net_namespace.h> +#include <net/netdev_lock.h> #include <net/devlink.h> #if IS_ENABLED(CONFIG_IPV6) #include <net/addrconf.h> |