diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2013-09-25 03:20:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-26 16:02:06 -0400 |
commit | 0965a1f3f8757a2c20a16a83bc18279009d79a26 (patch) | |
tree | dd7b1c154e8b5e01f31422ebdf3c27df8b583780 /drivers/net/bonding/bond_3ad.c | |
parent | b386c58b85b23c3a73baa014d01d2943ca8260cd (diff) |
bonding: add bond_has_slaves() and use it
Currently we verify if we have slaves by checking if bond->slave_list is
empty. Create a define bond_has_slaves() and use it, a bit more readable
and easier to change in the future.
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index c861ee7e65ff..1337eafe4311 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -2117,7 +2117,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work) | |||
2117 | read_lock(&bond->lock); | 2117 | read_lock(&bond->lock); |
2118 | 2118 | ||
2119 | //check if there are any slaves | 2119 | //check if there are any slaves |
2120 | if (list_empty(&bond->slave_list)) | 2120 | if (!bond_has_slaves(bond)) |
2121 | goto re_arm; | 2121 | goto re_arm; |
2122 | 2122 | ||
2123 | // check if agg_select_timer timer after initialize is timed out | 2123 | // check if agg_select_timer timer after initialize is timed out |