Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103601
b: refs/heads/master
c: 8a34c5d
h: refs/heads/master
i:
  103599: 2d2c648
v: v3
  • Loading branch information
David S. Miller committed Jul 18, 2008
1 parent bc5c7a2 commit 1592378
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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: 16361127ebed0fb8f9d7cc94c6e137eaf710f676
refs/heads/master: 8a34c5dc3a7c6431f1cd94c0904be81b296e08ca
20 changes: 11 additions & 9 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,28 +545,30 @@ EXPORT_SYMBOL(qdisc_reset);
static void __qdisc_destroy(struct rcu_head *head)
{
struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu);
const struct Qdisc_ops *ops = qdisc->ops;

gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est);
if (ops->reset)
ops->reset(qdisc);
if (ops->destroy)
ops->destroy(qdisc);

module_put(ops->owner);
dev_put(qdisc_dev(qdisc));

kfree((char *) qdisc - qdisc->padded);
}

/* Under queue->lock and BH! */

void qdisc_destroy(struct Qdisc *qdisc)
{
const struct Qdisc_ops *ops = qdisc->ops;

if (qdisc->flags & TCQ_F_BUILTIN ||
!atomic_dec_and_test(&qdisc->refcnt))
return;

list_del(&qdisc->list);
gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est);
if (ops->reset)
ops->reset(qdisc);
if (ops->destroy)
ops->destroy(qdisc);

module_put(ops->owner);
dev_put(qdisc_dev(qdisc));
call_rcu(&qdisc->q_rcu, __qdisc_destroy);
}
EXPORT_SYMBOL(qdisc_destroy);
Expand Down

0 comments on commit 1592378

Please sign in to comment.