Re: [PATCH v2] block/laptop_mode: Convert timers to use timer_setup()
From: Christoph Hellwig
Date: Fri Oct 06 2017 - 04:20:29 EST
> -static void blk_rq_timed_out_timer(unsigned long data)
> +static void blk_rq_timed_out_timer(struct timer_list *t)
> {
> - struct request_queue *q = (struct request_queue *)data;
> + struct request_queue *q = from_timer(q, t, timeout);
>
> kblockd_schedule_work(&q->timeout_work);
> }
This isn't the laptop_mode timer, although the change itself looks fine.
> + timer_setup(&q->backing_dev_info->laptop_mode_wb_timer,
> + laptop_mode_timer_fn, 0);
And I already pointed out to Jens when he did the previous changes
to this one that it has no business being in the block code, it
really should move to mm/page-writeback.c with the rest of the
handling of this timer. Once that is fixed up your automated script
should pick it up, so we wouldn't need the manual change.
Untested patch for that below:
---