Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

ipv6: __ipv6_dev_get_saddr() rcu conversion



Callers hold rcu_read_lock(), so we do not need
the rcu_read_lock()/rcu_read_unlock() pair.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 24ba333b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1558,8 +1558,7 @@ static int __ipv6_dev_get_saddr(struct net *net,
{
	struct ipv6_saddr_score *score = &scores[1 - hiscore_idx], *hiscore = &scores[hiscore_idx];

	read_lock_bh(&idev->lock);
	list_for_each_entry(score->ifa, &idev->addr_list, if_list) {
	list_for_each_entry_rcu(score->ifa, &idev->addr_list, if_list) {
		int i;

		/*
@@ -1625,7 +1624,6 @@ static int __ipv6_dev_get_saddr(struct net *net,
		}
	}
out:
	read_unlock_bh(&idev->lock);
	return hiscore_idx;
}