diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-22 00:28:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-22 00:28:51 -0400 |
commit | 43f59c89399fd76883a06c551f24794e98409432 (patch) | |
tree | 7ef8ac7047ea5e74c9d522d6438d03fb69a3ba67 | |
parent | f5fff5dc8a7a3f395b0525c02ba92c95d42b7390 (diff) |
net: Remove __skb_insert() calls outside of skbuff internals.
This minor cleanup simplifies later changes which will convert
struct sk_buff and friends over to using struct list_head.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/cassini.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp_generic.c | 2 | ||||
-rw-r--r-- | drivers/net/pppol2tp.c | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 4 | ||||
-rw-r--r-- | net/sctp/ulpqueue.c | 5 |
6 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index f1936d51b458..40ff6a90d0da 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -2182,7 +2182,7 @@ static inline void cas_rx_flow_pkt(struct cas *cp, const u64 *words, | |||
2182 | * do any additional locking here. stick the buffer | 2182 | * do any additional locking here. stick the buffer |
2183 | * at the end. | 2183 | * at the end. |
2184 | */ | 2184 | */ |
2185 | __skb_insert(skb, flow->prev, (struct sk_buff *) flow, flow); | 2185 | __skb_queue_tail(flow, skb); |
2186 | if (words[0] & RX_COMP1_RELEASE_FLOW) { | 2186 | if (words[0] & RX_COMP1_RELEASE_FLOW) { |
2187 | while ((skb = __skb_dequeue(flow))) { | 2187 | while ((skb = __skb_dequeue(flow))) { |
2188 | cas_skb_release(skb); | 2188 | cas_skb_release(skb); |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ddccc074a76a..98e04958fef3 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1864,7 +1864,7 @@ ppp_mp_insert(struct ppp *ppp, struct sk_buff *skb) | |||
1864 | for (p = list->next; p != (struct sk_buff *)list; p = p->next) | 1864 | for (p = list->next; p != (struct sk_buff *)list; p = p->next) |
1865 | if (seq_before(seq, p->sequence)) | 1865 | if (seq_before(seq, p->sequence)) |
1866 | break; | 1866 | break; |
1867 | __skb_insert(skb, p->prev, p, list); | 1867 | __skb_queue_before(list, p, skb); |
1868 | } | 1868 | } |
1869 | 1869 | ||
1870 | /* | 1870 | /* |
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index ff175e8f36b2..185b1dff10a8 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -353,7 +353,7 @@ static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_ | |||
353 | spin_lock_bh(&session->reorder_q.lock); | 353 | spin_lock_bh(&session->reorder_q.lock); |
354 | skb_queue_walk_safe(&session->reorder_q, skbp, tmp) { | 354 | skb_queue_walk_safe(&session->reorder_q, skbp, tmp) { |
355 | if (PPPOL2TP_SKB_CB(skbp)->ns > ns) { | 355 | if (PPPOL2TP_SKB_CB(skbp)->ns > ns) { |
356 | __skb_insert(skb, skbp->prev, skbp, &session->reorder_q); | 356 | __skb_queue_before(&session->reorder_q, skbp, skb); |
357 | PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG, | 357 | PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG, |
358 | "%s: pkt %hu, inserted before %hu, reorder_q len=%d\n", | 358 | "%s: pkt %hu, inserted before %hu, reorder_q len=%d\n", |
359 | session->name, ns, PPPOL2TP_SKB_CB(skbp)->ns, | 359 | session->name, ns, PPPOL2TP_SKB_CB(skbp)->ns, |
diff --git a/include/net/tcp.h b/include/net/tcp.h index ea815723d414..f857c3eff710 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1268,12 +1268,12 @@ static inline void tcp_insert_write_queue_after(struct sk_buff *skb, | |||
1268 | __skb_queue_after(&sk->sk_write_queue, skb, buff); | 1268 | __skb_queue_after(&sk->sk_write_queue, skb, buff); |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | /* Insert skb between prev and next on the write queue of sk. */ | 1271 | /* Insert new before skb on the write queue of sk. */ |
1272 | static inline void tcp_insert_write_queue_before(struct sk_buff *new, | 1272 | static inline void tcp_insert_write_queue_before(struct sk_buff *new, |
1273 | struct sk_buff *skb, | 1273 | struct sk_buff *skb, |
1274 | struct sock *sk) | 1274 | struct sock *sk) |
1275 | { | 1275 | { |
1276 | __skb_insert(new, skb->prev, skb, &sk->sk_write_queue); | 1276 | __skb_queue_before(&sk->sk_write_queue, skb, new); |
1277 | 1277 | ||
1278 | if (sk->sk_send_head == skb) | 1278 | if (sk->sk_send_head == skb) |
1279 | sk->sk_send_head = new; | 1279 | sk->sk_send_head = new; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 85627f83665f..cbfe13d5f423 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4156,7 +4156,7 @@ drop: | |||
4156 | skb1 = skb1->prev; | 4156 | skb1 = skb1->prev; |
4157 | } | 4157 | } |
4158 | } | 4158 | } |
4159 | __skb_insert(skb, skb1, skb1->next, &tp->out_of_order_queue); | 4159 | __skb_queue_after(&tp->out_of_order_queue, skb1, skb); |
4160 | 4160 | ||
4161 | /* And clean segments covered by new one as whole. */ | 4161 | /* And clean segments covered by new one as whole. */ |
4162 | while ((skb1 = skb->next) != | 4162 | while ((skb1 = skb->next) != |
@@ -4254,7 +4254,7 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list, | |||
4254 | memcpy(nskb->head, skb->head, header); | 4254 | memcpy(nskb->head, skb->head, header); |
4255 | memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); | 4255 | memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); |
4256 | TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start; | 4256 | TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start; |
4257 | __skb_insert(nskb, skb->prev, skb, list); | 4257 | __skb_queue_before(list, skb, nskb); |
4258 | skb_set_owner_r(nskb, sk); | 4258 | skb_set_owner_r(nskb, sk); |
4259 | 4259 | ||
4260 | /* Copy data, releasing collapsed skbs. */ | 4260 | /* Copy data, releasing collapsed skbs. */ |
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 5061a26c5028..7b23803343cc 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c | |||
@@ -317,7 +317,7 @@ static void sctp_ulpq_store_reasm(struct sctp_ulpq *ulpq, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* Insert before pos. */ | 319 | /* Insert before pos. */ |
320 | __skb_insert(sctp_event2skb(event), pos->prev, pos, &ulpq->reasm); | 320 | __skb_queue_before(&ulpq->reasm, pos, sctp_event2skb(event)); |
321 | 321 | ||
322 | } | 322 | } |
323 | 323 | ||
@@ -825,8 +825,7 @@ static void sctp_ulpq_store_ordered(struct sctp_ulpq *ulpq, | |||
825 | 825 | ||
826 | 826 | ||
827 | /* Insert before pos. */ | 827 | /* Insert before pos. */ |
828 | __skb_insert(sctp_event2skb(event), pos->prev, pos, &ulpq->lobby); | 828 | __skb_queue_before(&ulpq->lobby, pos, sctp_event2skb(event)); |
829 | |||
830 | } | 829 | } |
831 | 830 | ||
832 | static struct sctp_ulpevent *sctp_ulpq_order(struct sctp_ulpq *ulpq, | 831 | static struct sctp_ulpevent *sctp_ulpq_order(struct sctp_ulpq *ulpq, |