bonding: get netdev_rx_handler_unregister out of locks
[linux-2.6.git] / drivers / net / bonding / bond_main.c
index 76f2718..d9f646f 100644 (file)
@@ -1956,12 +1956,11 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
                return -EINVAL;
        }
 
+       write_unlock_bh(&bond->lock);
        /* unregister rx_handler early so bond_handle_frame wouldn't be called
         * for this slave anymore.
         */
        netdev_rx_handler_unregister(slave_dev);
-       write_unlock_bh(&bond->lock);
-       synchronize_net();
        write_lock_bh(&bond->lock);
 
        if (!bond->params.fail_over_mac) {