X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fdecnet%2Fdn_fib.c;h=9934b25720e4f5f3ef6b74e7ff04d8b984079738;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=3aaa8cd30c538903616ce6e2f9a69c574bf345dc;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 3aaa8cd30..9934b2572 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c @@ -57,10 +57,9 @@ extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); -static spinlock_t dn_fib_multipath_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(dn_fib_multipath_lock); static struct dn_fib_info *dn_fib_info_list; -static rwlock_t dn_fib_info_lock = RW_LOCK_UNLOCKED; -int dn_fib_info_cnt; +static DEFINE_RWLOCK(dn_fib_info_lock); static struct { @@ -93,7 +92,6 @@ void dn_fib_free_info(struct dn_fib_info *fi) dev_put(nh->nh_dev); nh->nh_dev = NULL; } endfor_nexthops(fi); - dn_fib_info_cnt--; kfree(fi); } @@ -388,7 +386,6 @@ link_it: if (dn_fib_info_list) dn_fib_info_list->fib_prev = fi; dn_fib_info_list = fi; - dn_fib_info_cnt++; write_unlock(&dn_fib_info_lock); return fi; @@ -486,18 +483,6 @@ void dn_fib_select_multipath(const struct flowi *fl, struct dn_fib_res *res) } -/* - * Punt to user via netlink for example, but for now - * we just drop it. - */ -int dn_fib_rt_message(struct sk_buff *skb) -{ - kfree_skb(skb); - - return 0; -} - - static int dn_fib_check_attr(struct rtmsg *r, struct rtattr **rta) { int i;