diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-04 04:21:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-04 22:05:32 +0300 |
commit | 1f1b9c9990205759aae31b7734b0ede41a867f32 (patch) | |
tree | aba367dd7280ff38932c881a0fcf5356bea53df2 /net/ipv4/fib_lookup.h | |
parent | cccbe5ef85284621d19e5b2b1c61cc0506bc9dee (diff) | |
download | linux-1f1b9c9990205759aae31b7734b0ede41a867f32.tar.xz |
fib: fib_result_assign() should not change fib refcounts
After commit ebc0ffae5 (RCU conversion of fib_lookup()),
fib_result_assign() should not change fib refcounts anymore.
Thanks to Michael who did the bisection and bug report.
Reported-by: Michael Ellerman <michael@ellerman.id.au>
Tested-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_lookup.h')
-rw-r--r-- | net/ipv4/fib_lookup.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h index a29edf2219c8..c079cc0ec651 100644 --- a/net/ipv4/fib_lookup.h +++ b/net/ipv4/fib_lookup.h @@ -47,11 +47,8 @@ extern int fib_detect_death(struct fib_info *fi, int order, static inline void fib_result_assign(struct fib_result *res, struct fib_info *fi) { - if (res->fi != NULL) - fib_info_put(res->fi); + /* we used to play games with refcounts, but we now use RCU */ res->fi = fi; - if (fi != NULL) - atomic_inc(&fi->fib_clntref); } #endif /* _FIB_LOOKUP_H */ |