Commit 322dc6e0 authored by Mahesh Bandewar's avatar Mahesh Bandewar Committed by David S. Miller

macvlan: use netdev_is_rx_handler_busy instead of checking specific type

netdev_is_rx_handler_busy() check is a superset of netif_is_ipvlan_port()
check and hence should be preferred.
Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3262d9d
...@@ -1110,7 +1110,7 @@ static int macvlan_port_create(struct net_device *dev) ...@@ -1110,7 +1110,7 @@ static int macvlan_port_create(struct net_device *dev)
if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK) if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK)
return -EINVAL; return -EINVAL;
if (netif_is_ipvlan_port(dev)) if (netdev_is_rx_handler_busy(dev))
return -EBUSY; return -EBUSY;
port = kzalloc(sizeof(*port), GFP_KERNEL); port = kzalloc(sizeof(*port), GFP_KERNEL);
......
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