Re: [PATCH v2] block/laptop_mode: Convert timers to use timer_setup()

2017-10-09 Thread Jan Kara
On Fri 06-10-17 01:20:20, Christoph Hellwig wrote: > From 77881bd72b5fb1219fc74625b0380930f9c580df Mon Sep 17 00:00:00 2001 > From: Christoph Hellwig > Date: Fri, 6 Oct 2017 10:18:53 +0200 > Subject: mm: move all laptop_mode handling to backing-dev.c > > It isn't block-device specific and oddly s

Re: [PATCH v2] block/laptop_mode: Convert timers to use timer_setup()

2017-10-06 Thread Jens Axboe
On 10/06/2017 02:20 AM, Christoph Hellwig wrote: >> -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);

Re: [PATCH v2] block/laptop_mode: Convert timers to use timer_setup()

2017-10-06 Thread Christoph Hellwig
> -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)

[PATCH v2] block/laptop_mode: Convert timers to use timer_setup()

2017-10-05 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jens Axboe Cc: Michal Hocko Cc: Andrew Morton Cc: Jan Kara Cc: Johannes Weiner Cc: Nicholas Piggin