[Devel] [PATCH RHEL7 COMMIT] net/fib: drop leftovers from per-ve_struct fib tables
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Dec 18 18:54:54 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-693.11.1.vz7.39.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.1.vz7.39.7
------>
commit f08d1a07d02b71f2da58dc4332c4953dd84b314d
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Mon Dec 18 18:54:54 2017 +0300
net/fib: drop leftovers from per-ve_struct fib tables
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 at virtuozzo.com>
---
net/ipv6/ip6_fib.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 1f158ce4c843..58393c355d1b 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
More information about the Devel
mailing list