macvlan: use netdev_is_rx_handler_busy instead of checking specific type
authorMahesh Bandewar <maheshb@google.com>
Wed, 18 Jan 2017 23:02:55 +0000 (15:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jan 2017 17:22:26 +0000 (12:22 -0500)
netdev_is_rx_handler_busy() check is a superset of netif_is_ipvlan_port()
check and hence should be preferred.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index 440ab3d..cbfc1be 100644 (file)
@@ -1110,7 +1110,7 @@ static int macvlan_port_create(struct net_device *dev)
        if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK)
                return -EINVAL;
 
-       if (netif_is_ipvlan_port(dev))
+       if (netdev_is_rx_handler_busy(dev))
                return -EBUSY;
 
        port = kzalloc(sizeof(*port), GFP_KERNEL);