diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6bbd90e1123c..171b10f167a5 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1976,12 +1976,11 @@ static int __bond_release_one(struct net_device *bond_dev, | |||
1976 | return -EINVAL; | 1976 | return -EINVAL; |
1977 | } | 1977 | } |
1978 | 1978 | ||
1979 | write_unlock_bh(&bond->lock); | ||
1979 | /* unregister rx_handler early so bond_handle_frame wouldn't be called | 1980 | /* unregister rx_handler early so bond_handle_frame wouldn't be called |
1980 | * for this slave anymore. | 1981 | * for this slave anymore. |
1981 | */ | 1982 | */ |
1982 | netdev_rx_handler_unregister(slave_dev); | 1983 | netdev_rx_handler_unregister(slave_dev); |
1983 | write_unlock_bh(&bond->lock); | ||
1984 | synchronize_net(); | ||
1985 | write_lock_bh(&bond->lock); | 1984 | write_lock_bh(&bond->lock); |
1986 | 1985 | ||
1987 | if (!all && !bond->params.fail_over_mac) { | 1986 | if (!all && !bond->params.fail_over_mac) { |
@@ -4903,8 +4902,8 @@ static void __exit bonding_exit(void) | |||
4903 | 4902 | ||
4904 | bond_destroy_debugfs(); | 4903 | bond_destroy_debugfs(); |
4905 | 4904 | ||
4906 | rtnl_link_unregister(&bond_link_ops); | ||
4907 | unregister_pernet_subsys(&bond_net_ops); | 4905 | unregister_pernet_subsys(&bond_net_ops); |
4906 | rtnl_link_unregister(&bond_link_ops); | ||
4908 | 4907 | ||
4909 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4908 | #ifdef CONFIG_NET_POLL_CONTROLLER |
4910 | /* | 4909 | /* |