Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121725
b: refs/heads/master
c: 61c9eaf
h: refs/heads/master
i:
  121723: 42c996d
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Nov 6, 2008
1 parent 3760ba5 commit 7050332
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a36b345ab99d6b3c96999e7e3b79bd243cf9bf7
refs/heads/master: 61c9eaf90081cbe6dc4f389e0056bff76eca19ec
12 changes: 9 additions & 3 deletions trunk/include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,12 @@ static inline struct sk_buff *qdisc_peek_head(struct Qdisc *sch)
static inline struct sk_buff *qdisc_peek_dequeued(struct Qdisc *sch)
{
/* we can reuse ->gso_skb because peek isn't called for root qdiscs */
if (!sch->gso_skb)
if (!sch->gso_skb) {
sch->gso_skb = sch->dequeue(sch);
if (sch->gso_skb)
/* it's still part of the queue */
sch->q.qlen++;
}

return sch->gso_skb;
}
Expand All @@ -453,10 +457,12 @@ static inline struct sk_buff *qdisc_dequeue_peeked(struct Qdisc *sch)
{
struct sk_buff *skb = sch->gso_skb;

if (skb)
if (skb) {
sch->gso_skb = NULL;
else
sch->q.qlen--;
} else {
skb = sch->dequeue(sch);
}

return skb;
}
Expand Down

0 comments on commit 7050332

Please sign in to comment.