Skip to content

Commit f32404a

Browse files
jmberg-intelkuba-moo
authored andcommitted
net: move net_unlink_todo() out of the header
There's no reason for this to be in netdevice.h, it's all just used in dev.c. Also make it no longer inline and let the compiler decide to do that by itself. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://lore.kernel.org/r/20220325225023.f49b9056fe1c.I6b901a2df00000837a9bd251a8dd259bd23f5ded@changeid Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6da69b1 commit f32404a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

include/linux/netdevice.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4601,16 +4601,6 @@ bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev);
46014601
struct net_device *netdev_upper_get_next_dev_rcu(struct net_device *dev,
46024602
struct list_head **iter);
46034603

4604-
#ifdef CONFIG_LOCKDEP
4605-
static LIST_HEAD(net_unlink_list);
4606-
4607-
static inline void net_unlink_todo(struct net_device *dev)
4608-
{
4609-
if (list_empty(&dev->unlink_list))
4610-
list_add_tail(&dev->unlink_list, &net_unlink_list);
4611-
}
4612-
#endif
4613-
46144604
/* iterate through upper list, must be called under RCU read lock */
46154605
#define netdev_for_each_upper_dev_rcu(dev, updev, iter) \
46164606
for (iter = &(dev)->adj_list.upper, \

net/core/dev.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7193,6 +7193,16 @@ static int __netdev_update_upper_level(struct net_device *dev,
71937193
return 0;
71947194
}
71957195

7196+
#ifdef CONFIG_LOCKDEP
7197+
static LIST_HEAD(net_unlink_list);
7198+
7199+
static void net_unlink_todo(struct net_device *dev)
7200+
{
7201+
if (list_empty(&dev->unlink_list))
7202+
list_add_tail(&dev->unlink_list, &net_unlink_list);
7203+
}
7204+
#endif
7205+
71967206
static int __netdev_update_lower_level(struct net_device *dev,
71977207
struct netdev_nested_priv *priv)
71987208
{

0 commit comments

Comments
 (0)