aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2007-12-08 03:22:13 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:57:00 -0500
commitc17860a039bbde134324ad6f9331500635f5799d (patch)
tree0edd5f21bd2494d2b7bfd79a67d68888afb3c9f4
parent7e5449c21562f1554d2c355db1ec9d3e4f434288 (diff)
[IPV4]: no need pass pointer to a default into fib_detect_death
ipv4: no need pass pointer to a default into fib_detect_death Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/fib_hash.c4
-rw-r--r--net/ipv4/fib_lookup.h2
-rw-r--r--net/ipv4/fib_semantics.c6
-rw-r--r--net/ipv4/fib_trie.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 638185eb315f..143a5213a185 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -314,7 +314,7 @@ fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
314 if (next_fi != res->fi) 314 if (next_fi != res->fi)
315 break; 315 break;
316 } else if (!fib_detect_death(fi, order, &last_resort, 316 } else if (!fib_detect_death(fi, order, &last_resort,
317 &last_idx, &fn_hash_last_dflt)) { 317 &last_idx, fn_hash_last_dflt)) {
318 if (res->fi) 318 if (res->fi)
319 fib_info_put(res->fi); 319 fib_info_put(res->fi);
320 res->fi = fi; 320 res->fi = fi;
@@ -332,7 +332,7 @@ fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
332 goto out; 332 goto out;
333 } 333 }
334 334
335 if (!fib_detect_death(fi, order, &last_resort, &last_idx, &fn_hash_last_dflt)) { 335 if (!fib_detect_death(fi, order, &last_resort, &last_idx, fn_hash_last_dflt)) {
336 if (res->fi) 336 if (res->fi)
337 fib_info_put(res->fi); 337 fib_info_put(res->fi);
338 res->fi = fi; 338 res->fi = fi;
diff --git a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h
index eef9eec17e0c..6c9dd4282db0 100644
--- a/net/ipv4/fib_lookup.h
+++ b/net/ipv4/fib_lookup.h
@@ -36,6 +36,6 @@ extern struct fib_alias *fib_find_alias(struct list_head *fah,
36 u8 tos, u32 prio); 36 u8 tos, u32 prio);
37extern int fib_detect_death(struct fib_info *fi, int order, 37extern int fib_detect_death(struct fib_info *fi, int order,
38 struct fib_info **last_resort, 38 struct fib_info **last_resort,
39 int *last_idx, int *dflt); 39 int *last_idx, int dflt);
40 40
41#endif /* _FIB_LOOKUP_H */ 41#endif /* _FIB_LOOKUP_H */
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index ec9b0dde9f9c..bbd4a247b195 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -346,7 +346,7 @@ struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio)
346} 346}
347 347
348int fib_detect_death(struct fib_info *fi, int order, 348int fib_detect_death(struct fib_info *fi, int order,
349 struct fib_info **last_resort, int *last_idx, int *dflt) 349 struct fib_info **last_resort, int *last_idx, int dflt)
350{ 350{
351 struct neighbour *n; 351 struct neighbour *n;
352 int state = NUD_NONE; 352 int state = NUD_NONE;
@@ -358,10 +358,10 @@ int fib_detect_death(struct fib_info *fi, int order,
358 } 358 }
359 if (state==NUD_REACHABLE) 359 if (state==NUD_REACHABLE)
360 return 0; 360 return 0;
361 if ((state&NUD_VALID) && order != *dflt) 361 if ((state&NUD_VALID) && order != dflt)
362 return 0; 362 return 0;
363 if ((state&NUD_VALID) || 363 if ((state&NUD_VALID) ||
364 (*last_idx<0 && order > *dflt)) { 364 (*last_idx<0 && order > dflt)) {
365 *last_resort = fi; 365 *last_resort = fi;
366 *last_idx = order; 366 *last_idx = order;
367 } 367 }
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 13a80aa911d8..d48a9bbcf54d 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1830,7 +1830,7 @@ fn_trie_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
1830 if (next_fi != res->fi) 1830 if (next_fi != res->fi)
1831 break; 1831 break;
1832 } else if (!fib_detect_death(fi, order, &last_resort, 1832 } else if (!fib_detect_death(fi, order, &last_resort,
1833 &last_idx, &trie_last_dflt)) { 1833 &last_idx, trie_last_dflt)) {
1834 if (res->fi) 1834 if (res->fi)
1835 fib_info_put(res->fi); 1835 fib_info_put(res->fi);
1836 res->fi = fi; 1836 res->fi = fi;
@@ -1846,7 +1846,7 @@ fn_trie_select_default(struct fib_table *tb, const struct flowi *flp, struct fib
1846 goto out; 1846 goto out;
1847 } 1847 }
1848 1848
1849 if (!fib_detect_death(fi, order, &last_resort, &last_idx, &trie_last_dflt)) { 1849 if (!fib_detect_death(fi, order, &last_resort, &last_idx, trie_last_dflt)) {
1850 if (res->fi) 1850 if (res->fi)
1851 fib_info_put(res->fi); 1851 fib_info_put(res->fi);
1852 res->fi = fi; 1852 res->fi = fi;