tipc: Simplify bearer shutdown logic
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 14 Oct 2010 13:58:26 +0000 (13:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Oct 2010 08:50:49 +0000 (01:50 -0700)
commitccc901ee58cfb090a31216a6eda0f1e9dfc572fa
tree84ef5ceb36f6b44c2ba66830c20ebb1fd3b85dcd
parent724829b3ad8e8aeb0aec46de383d35bfa1ad3875
tipc: Simplify bearer shutdown logic

Optimize processing in TIPC's bearer shutdown code, including:

1. Remove an unnecessary check to see if TIPC bearer's can exist.
2. Don't release spinlocks before calling a media-specific disabling
routine, since the routine can't sleep.
3. Make bearer_disable() operate directly on a struct bearer, instead
of needlessly taking a name and then mapping that to the struct.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bearer.c