git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
net
/
ipv4
/
multipath_wrandom.c
diff --git
a/net/ipv4/multipath_wrandom.c
b/net/ipv4/multipath_wrandom.c
index
bd7d75b
..
342d0b9
100644
(file)
--- a/
net/ipv4/multipath_wrandom.c
+++ b/
net/ipv4/multipath_wrandom.c
@@
-207,16
+207,12
@@
static void wrandom_select_route(const struct flowi *flp,
decision = mpc->rt;
last_power = mpc->power;
decision = mpc->rt;
last_power = mpc->power;
- if (last_mpc)
- kfree(last_mpc);
-
+ kfree(last_mpc);
last_mpc = mpc;
}
last_mpc = mpc;
}
- if (last_mpc) {
- /* concurrent __multipath_flush may lead to !last_mpc */
- kfree(last_mpc);
- }
+ /* concurrent __multipath_flush may lead to !last_mpc */
+ kfree(last_mpc);
decision->u.dst.__use++;
*rp = decision;
decision->u.dst.__use++;
*rp = decision;
@@
-232,7
+228,7
@@
static void wrandom_set_nhinfo(__u32 network,
struct multipath_dest *d, *target_dest = NULL;
/* store the weight information for a certain route */
struct multipath_dest *d, *target_dest = NULL;
/* store the weight information for a certain route */
- spin_lock(&state[state_idx].lock);
+ spin_lock
_bh
(&state[state_idx].lock);
/* find state entry for gateway or add one if necessary */
list_for_each_entry_rcu(r, &state[state_idx].head, list) {
/* find state entry for gateway or add one if necessary */
list_for_each_entry_rcu(r, &state[state_idx].head, list) {
@@
-280,7
+276,7
@@
static void wrandom_set_nhinfo(__u32 network,
* we are finished
*/
* we are finished
*/
- spin_unlock(&state[state_idx].lock);
+ spin_unlock
_bh
(&state[state_idx].lock);
}
static void __multipath_free(struct rcu_head *head)
}
static void __multipath_free(struct rcu_head *head)
@@
-306,7
+302,7
@@
static void wrandom_flush(void)
for (i = 0; i < MULTIPATH_STATE_SIZE; ++i) {
struct multipath_route *r;
for (i = 0; i < MULTIPATH_STATE_SIZE; ++i) {
struct multipath_route *r;
- spin_lock(&state[i].lock);
+ spin_lock
_bh
(&state[i].lock);
list_for_each_entry_rcu(r, &state[i].head, list) {
struct multipath_dest *d;
list_for_each_entry_rcu(d, &r->dests, list) {
list_for_each_entry_rcu(r, &state[i].head, list) {
struct multipath_dest *d;
list_for_each_entry_rcu(d, &r->dests, list) {
@@
-319,7
+315,7
@@
static void wrandom_flush(void)
__multipath_free);
}
__multipath_free);
}
- spin_unlock(&state[i].lock);
+ spin_unlock
_bh
(&state[i].lock);
}
}
}
}