From: Parav Pandit Date: Sun, 28 Jan 2018 09:25:32 +0000 (+0200) Subject: RDMA/cma: Use existing netif_is_bond_master function X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3cd96fddccb8f0cb18899e169314276e3f9f2c44;p=openwrt%2Fstaging%2Fblogic.git RDMA/cma: Use existing netif_is_bond_master function When checking whatever the current netdev is the bond master interface, use kernel API netif_is_bond_master() instead of hardcoding the check. No functionality is changed. Reviewed-by: Mark Bloch Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 84812b9dea9b..e66963ca58bd 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -4294,7 +4294,7 @@ static int cma_netdev_callback(struct notifier_block *self, unsigned long event, if (event != NETDEV_BONDING_FAILOVER) return NOTIFY_DONE; - if (!(ndev->flags & IFF_MASTER) || !(ndev->priv_flags & IFF_BONDING)) + if (!netif_is_bond_master(ndev)) return NOTIFY_DONE; mutex_lock(&lock);