Skip to content

Commit

Permalink
RDMA/cma: Use existing netif_is_bond_master function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Parav Pandit authored and Jason Gunthorpe committed Jan 28, 2018
1 parent 708ea05 commit 3cd96fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3cd96fd

Please sign in to comment.