diff options
| author | James Morris <james.l.morris@oracle.com> | 2017-11-29 12:47:41 +1100 | 
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2017-11-29 12:47:41 +1100 | 
| commit | cf40a76e7d5874bb25f4404eecc58a2e033af885 (patch) | |
| tree | 8fd81cbea03c87b3d41d7ae5b1d11eadd35d6ef5 /net/sched/sch_pie.c | |
| parent | ab5348c9c23cd253f5902980d2d8fe067dc24c82 (diff) | |
| parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) | |
Merge tag 'v4.15-rc1' into next-seccomp
Linux 4.15-rc1
Diffstat (limited to 'net/sched/sch_pie.c')
| -rw-r--r-- | net/sched/sch_pie.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 6c2791d6102d..776c694c77c7 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -74,6 +74,7 @@ struct pie_sched_data {  	struct pie_vars vars;  	struct pie_stats stats;  	struct timer_list adapt_timer; +	struct Qdisc *sch;  };  static void pie_params_init(struct pie_params *params) @@ -422,10 +423,10 @@ static void calculate_probability(struct Qdisc *sch)  		pie_vars_init(&q->vars);  } -static void pie_timer(unsigned long arg) +static void pie_timer(struct timer_list *t)  { -	struct Qdisc *sch = (struct Qdisc *)arg; -	struct pie_sched_data *q = qdisc_priv(sch); +	struct pie_sched_data *q = from_timer(q, t, adapt_timer); +	struct Qdisc *sch = q->sch;  	spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch));  	spin_lock(root_lock); @@ -446,7 +447,8 @@ static int pie_init(struct Qdisc *sch, struct nlattr *opt)  	pie_vars_init(&q->vars);  	sch->limit = q->params.limit; -	setup_timer(&q->adapt_timer, pie_timer, (unsigned long)sch); +	q->sch = sch; +	timer_setup(&q->adapt_timer, pie_timer, 0);  	if (opt) {  		int err = pie_change(sch, opt); | 
