aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-05-08 14:52:57 -0400
committerSven Eckelmann <sven@narfation.org>2011-05-30 01:39:27 -0400
commite2cbc11c0e1225bd5fe183a967fc80df3db10745 (patch)
tree5e7bf4845b660067fdfb93e4cee836fa545a621f /net/batman-adv/routing.c
parent55922c9d1b84b89cb946c777fddccb3247e7df2c (diff)
batman-adv: move neigh_node->if_incoming->if_status check in find_router()
Every time that find_router() is invoked, if_status has to be compared with IF_ACTIVE. Moving this comparison inside find_router() will avoid to write it each time. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index bb1c3ec7e3ff..8c403ce785d0 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -1240,6 +1240,9 @@ struct neigh_node *find_router(struct bat_priv *bat_priv,
1240 router = find_ifalter_router(primary_orig_node, recv_if); 1240 router = find_ifalter_router(primary_orig_node, recv_if);
1241 1241
1242return_router: 1242return_router:
1243 if (router && router->if_incoming->if_status != IF_ACTIVE)
1244 goto err_unlock;
1245
1243 rcu_read_unlock(); 1246 rcu_read_unlock();
1244 return router; 1247 return router;
1245err_unlock: 1248err_unlock: