Commit 2b12caa0 authored by Herbert Xu's avatar Herbert Xu Committed by James Morris

[IRDA]: Trivial optimization in inetdev handling.

No need to hold onto the idev.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent f2868da9
...@@ -303,10 +303,10 @@ void irlan_eth_send_gratuitous_arp(struct net_device *dev) ...@@ -303,10 +303,10 @@ void irlan_eth_send_gratuitous_arp(struct net_device *dev)
*/ */
#ifdef CONFIG_INET #ifdef CONFIG_INET
IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n"); IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n");
in_dev = in_dev_get(dev);
if (in_dev == NULL)
return;
rcu_read_lock(); rcu_read_lock();
in_dev = __in_dev_get(dev);
if (in_dev == NULL)
goto out;
if (in_dev->ifa_list) if (in_dev->ifa_list)
arp_send(ARPOP_REQUEST, ETH_P_ARP, arp_send(ARPOP_REQUEST, ETH_P_ARP,
...@@ -314,8 +314,8 @@ void irlan_eth_send_gratuitous_arp(struct net_device *dev) ...@@ -314,8 +314,8 @@ void irlan_eth_send_gratuitous_arp(struct net_device *dev)
dev, dev,
in_dev->ifa_list->ifa_address, in_dev->ifa_list->ifa_address,
NULL, dev->dev_addr, NULL); NULL, dev->dev_addr, NULL);
out:
rcu_read_unlock(); rcu_read_unlock();
in_dev_put(in_dev);
#endif /* CONFIG_INET */ #endif /* CONFIG_INET */
} }
......
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