44#include <linux/percpu_counter.h>
55
66struct netns_frags {
7- struct list_head lru_list ;
8- spinlock_t lru_lock ;
9-
107 /* The percpu_counter "mem" need to be cacheline aligned.
118 * mem.count must not share cacheline with other writers
129 */
@@ -21,7 +18,6 @@ struct netns_frags {
2118struct inet_frag_queue {
2219 spinlock_t lock ;
2320 struct timer_list timer ; /* when will this queue expire? */
24- struct list_head lru_list ; /* lru list member */
2521 struct hlist_node list ;
2622 atomic_t refcnt ;
2723 struct sk_buff * fragments ; /* list of received fragments */
@@ -91,8 +87,7 @@ void inet_frags_init_net(struct netns_frags *nf);
9187void inet_frags_exit_net (struct netns_frags * nf , struct inet_frags * f );
9288
9389void inet_frag_kill (struct inet_frag_queue * q , struct inet_frags * f );
94- void inet_frag_destroy (struct inet_frag_queue * q ,
95- struct inet_frags * f , int * work );
90+ void inet_frag_destroy (struct inet_frag_queue * q , struct inet_frags * f );
9691struct inet_frag_queue * inet_frag_find (struct netns_frags * nf ,
9792 struct inet_frags * f , void * key , unsigned int hash )
9893 __releases (& f - > lock );
@@ -102,7 +97,7 @@ void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
10297static inline void inet_frag_put (struct inet_frag_queue * q , struct inet_frags * f )
10398{
10499 if (atomic_dec_and_test (& q -> refcnt ))
105- inet_frag_destroy (q , f , NULL );
100+ inet_frag_destroy (q , f );
106101}
107102
108103/* Memory Tracking Functions. */
@@ -145,29 +140,6 @@ static inline unsigned int sum_frag_mem_limit(struct netns_frags *nf)
145140 return res ;
146141}
147142
148- static inline void inet_frag_lru_move (struct inet_frag_queue * q )
149- {
150- spin_lock (& q -> net -> lru_lock );
151- if (!list_empty (& q -> lru_list ))
152- list_move_tail (& q -> lru_list , & q -> net -> lru_list );
153- spin_unlock (& q -> net -> lru_lock );
154- }
155-
156- static inline void inet_frag_lru_del (struct inet_frag_queue * q )
157- {
158- spin_lock (& q -> net -> lru_lock );
159- list_del_init (& q -> lru_list );
160- spin_unlock (& q -> net -> lru_lock );
161- }
162-
163- static inline void inet_frag_lru_add (struct netns_frags * nf ,
164- struct inet_frag_queue * q )
165- {
166- spin_lock (& nf -> lru_lock );
167- list_add_tail (& q -> lru_list , & nf -> lru_list );
168- spin_unlock (& nf -> lru_lock );
169- }
170-
171143/* RFC 3168 support :
172144 * We want to check ECN values of all fragments, do detect invalid combinations.
173145 * In ipq->ecn, we store the OR value of each ip4_frag_ecn() fragment value.
0 commit comments