bonding: simplify and fix peer notification
authornikolay@redhat.com <nikolay@redhat.com>
Mon, 2 Sep 2013 11:51:38 +0000 (13:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 04:27:24 +0000 (00:27 -0400)
commit6c8d23f78646b20bdbdad476d015b6594ac8ff1c
treef3bc75b01a5871be54c022a303e0eac8c791cc98
parentf7c6be404d8fa52c54ff931390aab01e5c7654d6
bonding: simplify and fix peer notification

This patch aims to remove a use of the bond->lock for mutual exclusion
which will later allow easier migration to RCU of the users of this
functionality. We use RTNL as a synchronizing mechanism since it's
always held when send_peer_notif is set, and when it is decremented from
the notifier function. We can also drop some locking, and fix the
leakage of the send_peer_notif counter.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c