diff options
author | Eric Dumazet <edumazet@google.com> | 2024-10-09 18:44:05 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-11 15:35:05 -0700 |
commit | 2698acd6ea4770809af7e65bb8b3250e0a3a807e (patch) | |
tree | 4c7dfc8f21794b0cbaaf9cee6e2353b47c59dd5b /net/core/fib_notifier.c | |
parent | 055202b16c589cc82cc8ab9d4316701547fb8853 (diff) | |
download | lwn-2698acd6ea4770809af7e65bb8b3250e0a3a807e.tar.gz lwn-2698acd6ea4770809af7e65bb8b3250e0a3a807e.zip |
net: do not acquire rtnl in fib_seq_sum()
After we made sure no fib_seq_read() handlers needs RTNL anymore,
we can remove RTNL from fib_seq_sum().
Note that after RTNL was dropped, fib_seq_sum() result was possibly
outdated anyway.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20241009184405.3752829-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/fib_notifier.c')
-rw-r--r-- | net/core/fib_notifier.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/fib_notifier.c b/net/core/fib_notifier.c index fc96259807b6..5cdca49b1d7c 100644 --- a/net/core/fib_notifier.c +++ b/net/core/fib_notifier.c @@ -43,7 +43,6 @@ static unsigned int fib_seq_sum(struct net *net) struct fib_notifier_ops *ops; unsigned int fib_seq = 0; - rtnl_lock(); rcu_read_lock(); list_for_each_entry_rcu(ops, &fn_net->fib_notifier_ops, list) { if (!try_module_get(ops->owner)) @@ -52,7 +51,6 @@ static unsigned int fib_seq_sum(struct net *net) module_put(ops->owner); } rcu_read_unlock(); - rtnl_unlock(); return fib_seq; } |