diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2006-10-12 21:21:06 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-15 23:14:17 -0700 |
commit | 4663afe2c848e2abc8791202beecf40684f13eb4 (patch) | |
tree | 4d67cf3a9910bb9c224b4495b554560ec438477e /include | |
parent | ea614d7f4fb2d436b7a5ee490d1011615f6b38d5 (diff) | |
download | op-kernel-dev-4663afe2c848e2abc8791202beecf40684f13eb4.zip op-kernel-dev-4663afe2c848e2abc8791202beecf40684f13eb4.tar.gz |
[NET]: reduce sizeof(struct inet_peer), cleanup, change in peer_check_expire()
1) shrink struct inet_peer on 64 bits platforms.
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inetpeer.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 925573f..f13cc0c 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h @@ -19,7 +19,7 @@ struct inet_peer { struct inet_peer *avl_left, *avl_right; struct inet_peer *unused_next, **unused_prevp; - unsigned long dtime; /* the time of last use of not + __u32 dtime; /* the time of last use of not * referenced entries */ atomic_t refcnt; __be32 v4daddr; /* peer's address */ @@ -35,21 +35,8 @@ void inet_initpeers(void) __init; /* can be called with or without local BH being disabled */ struct inet_peer *inet_getpeer(__be32 daddr, int create); -extern spinlock_t inet_peer_unused_lock; -extern struct inet_peer **inet_peer_unused_tailp; /* can be called from BH context or outside */ -static inline void inet_putpeer(struct inet_peer *p) -{ - spin_lock_bh(&inet_peer_unused_lock); - if (atomic_dec_and_test(&p->refcnt)) { - p->unused_prevp = inet_peer_unused_tailp; - p->unused_next = NULL; - *inet_peer_unused_tailp = p; - inet_peer_unused_tailp = &p->unused_next; - p->dtime = jiffies; - } - spin_unlock_bh(&inet_peer_unused_lock); -} +extern void inet_putpeer(struct inet_peer *p); extern spinlock_t inet_peer_idlock; /* can be called with or without local BH being disabled */ |