patch-2.4.3 linux/net/ipv4/ip_fragment.c
Next file: linux/net/ipv4/netfilter/Config.in
Previous file: linux/net/ipv4/devinet.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Sun Mar 25 18:14:25 2001
- Orig file:
v2.4.2/linux/net/ipv4/ip_fragment.c
- Orig date:
Fri Dec 29 14:07:24 2000
diff -u --recursive --new-file v2.4.2/linux/net/ipv4/ip_fragment.c linux/net/ipv4/ip_fragment.c
@@ -213,18 +213,17 @@
if (ipq_hash[i] == NULL)
continue;
- write_lock(&ipfrag_lock);
+ read_lock(&ipfrag_lock);
if ((qp = ipq_hash[i]) != NULL) {
/* find the oldest queue for this hash bucket */
while (qp->next)
qp = qp->next;
- __ipq_unlink(qp);
- write_unlock(&ipfrag_lock);
+ atomic_inc(&qp->refcnt);
+ read_unlock(&ipfrag_lock);
spin_lock(&qp->lock);
- if (del_timer(&qp->timer))
- atomic_dec(&qp->refcnt);
- qp->last_in |= COMPLETE;
+ if (!(qp->last_in&COMPLETE))
+ ipq_kill(qp);
spin_unlock(&qp->lock);
ipq_put(qp);
@@ -232,7 +231,7 @@
progress = 1;
continue;
}
- write_unlock(&ipfrag_lock);
+ read_unlock(&ipfrag_lock);
}
} while (progress);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)