mirror of https://gitee.com/openkylin/linux.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 <markb@mellanox.com> Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
708ea056b3
commit
3cd96fddcc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue