Commit d0075634 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

em_meta: avoid one dev_put()

Another rcu conversion to avoid one dev_hold()/dev_put() pair
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7079857
......@@ -309,10 +309,10 @@ META_COLLECTOR(var_sk_bound_if)
} else {
struct net_device *dev;
dev = dev_get_by_index(&init_net, skb->sk->sk_bound_dev_if);
rcu_read_lock();
dev = dev_get_by_index_rcu(&init_net, skb->sk->sk_bound_dev_if);
*err = var_dev(dev, dst);
if (dev)
dev_put(dev);
rcu_read_unlock();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment