Skip to content

Commit

Permalink
bonding: initialize work-queues during creation of bond
Browse files Browse the repository at this point in the history
Initializing work-queues every time ifup operation performed is unnecessary
and can be performed only once when the port is created.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mahesh Bandewar authored and davem330 committed Mar 10, 2017
1 parent d5e73f7 commit 4493b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3270,8 +3270,6 @@ static int bond_open(struct net_device *bond_dev)
}
}

bond_work_init_all(bond);

if (bond_is_lb(bond)) {
/* bond_alb_initialize must be called before the timer
* is started.
Expand Down Expand Up @@ -4691,6 +4689,8 @@ int bond_create(struct net *net, const char *name)

netif_carrier_off(bond_dev);

bond_work_init_all(bond);

rtnl_unlock();
if (res < 0)
bond_destructor(bond_dev);
Expand Down

0 comments on commit 4493b81

Please sign in to comment.