[rh7] net/fib: drop leftovers from per-ve_struct fib tables

Submitted by Konstantin Khorenko on Dec. 18, 2017, 3:54 p.m.

Details

Message ID 1513612456-8142-1-git-send-email-khorenko@virtuozzo.com
State New
Series "net/fib: drop leftovers from per-ve_struct fib tables"
Headers show

Commit Message

Konstantin Khorenko Dec. 18, 2017, 3:54 p.m.
There was a patch in 2.6.18-x: diff-ve-net-ipv6-comp-fix-20061220
which made per-ve_struct fib tables working, in particular
it introduced fib6_unlink_table() which managed tb->tb6_hlist
and thus required tb->tb6_lock there and in fib6_link_table().

This patch does not exist in 3.10.0-x =>
no need for a lock in fib6_link_table() either, drop it.

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 net/ipv6/ip6_fib.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index aa55469..a5fa8e5 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -198,9 +198,11 @@  static void fib6_link_table(struct net *net, struct fib6_table *tb)
 
 	h = tb->tb6_id & (FIB6_TABLE_HASHSZ - 1);
 
-	write_lock_bh(&tb->tb6_lock);
+	/*
+	 * No protection necessary, this is the only list mutatation
+	 * operation, tables never disappear once they exist.
+	 */
 	hlist_add_head_rcu(&tb->tb6_hlist, &net->ipv6.fib_table_hash[h]);
-	write_unlock_bh(&tb->tb6_lock);
 }
 
 #ifdef CONFIG_IPV6_MULTIPLE_TABLES