Skip to content

Commit

Permalink
bonding: avoid printing while holding a spinlock
Browse files Browse the repository at this point in the history
Signed-off-by: Mahesh Bandewar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Mahesh Bandewar authored and davem330 committed Mar 28, 2017
1 parent b5bf0f5 commit e292dca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,9 +2446,9 @@ void bond_3ad_adapter_speed_duplex_changed(struct slave *slave)

spin_lock_bh(&slave->bond->mode_lock);
ad_update_actor_keys(port, false);
spin_unlock_bh(&slave->bond->mode_lock);
netdev_dbg(slave->bond->dev, "Port %d slave %s changed speed/duplex\n",
port->actor_port_number, slave->dev->name);
spin_unlock_bh(&slave->bond->mode_lock);
}

/**
Expand Down Expand Up @@ -2492,12 +2492,12 @@ void bond_3ad_handle_link_change(struct slave *slave, char link)
agg = __get_first_agg(port);
ad_agg_selection_logic(agg, &dummy);

spin_unlock_bh(&slave->bond->mode_lock);

netdev_dbg(slave->bond->dev, "Port %d changed link status to %s\n",
port->actor_port_number,
link == BOND_LINK_UP ? "UP" : "DOWN");

spin_unlock_bh(&slave->bond->mode_lock);

/* RTNL is held and mode_lock is released so it's safe
* to update slave_array here.
*/
Expand Down

0 comments on commit e292dca

Please sign in to comment.