summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@google.com>2026-07-02 04:44:14 +0000
committerPaolo Abeni <pabeni@redhat.com>2026-07-07 10:51:06 +0200
commit6041421dd0876356794d49db00b65bb831066ad6 (patch)
tree4da424cff73e09547508d0cd3954d1a6e69fcb9f /include
parent474cff6868129755cf889edf40d7f491729fc588 (diff)
downloadlinux-6041421dd0876356794d49db00b65bb831066ad6.tar.gz
linux-6041421dd0876356794d49db00b65bb831066ad6.zip
ipv4: fib: Define fib_table_hash_lock under CONFIG_IP_MULTIPLE_TABLES.
When CONFIG_IP_MULTIPLE_TABLES is disabled, fib_new_table() is fib_get_table(), and no new table is created. Let's move net->ipv4.fib_table_hash_lock under CONFIG_IP_MULTIPLE_TABLES. While at it, netns_ipv4_sysctl.rst is updated. Suggested-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260702044437.591864-2-kuniyu@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/netns/ipv4.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 59506320558a..cb7f8bf15671 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -118,6 +118,7 @@ struct netns_ipv4 {
struct fib_rules_ops *rules_ops;
struct fib_table __rcu *fib_main;
struct fib_table __rcu *fib_default;
+ spinlock_t fib_table_hash_lock;
unsigned int fib_rules_require_fldissect;
bool fib_has_custom_rules;
#endif
@@ -127,7 +128,6 @@ struct netns_ipv4 {
atomic_t fib_num_tclassid_users;
#endif
struct hlist_head *fib_table_hash;
- spinlock_t fib_table_hash_lock;
struct sock *fibnl;
struct hlist_head *fib_info_hash;
unsigned int fib_info_hash_bits;