Commit b0270550 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

ipv6: fib6_info_destroy_rcu() cleanup



We do not need to clear f6i->rt6i_exception_bucket right before
freeing f6i.

Note that f6i->rt6i_exception_bucket is properly protected by
f6i->exception_bucket_flushed being set to one in rt6_flush_exceptions()
under the protection of rt6_exception_lock.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>
Acked-by: default avatarWei Wang <weiwan@google.com>
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20eb08b2
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -175,10 +175,7 @@ void fib6_info_destroy_rcu(struct rcu_head *head)
	WARN_ON(f6i->fib6_node);

	bucket = rcu_dereference_protected(f6i->rt6i_exception_bucket, 1);
	if (bucket) {
		f6i->rt6i_exception_bucket = NULL;
	kfree(bucket);
	}

	if (f6i->rt6i_pcpu) {
		int cpu;