diff options
author | Kees Cook <keescook@chromium.org> | 2017-08-28 15:03:41 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-21 15:46:44 -0800 |
commit | bca237a52ca0035b0a0380003283d8bf590188d5 (patch) | |
tree | d689ceca871d6c703871a6738a696a3091886a82 /mm | |
parent | 1e9aa74ecd84ac3eeffb7a9f08f9021d7df6486a (diff) | |
download | linux-stable-bca237a52ca0035b0a0380003283d8bf590188d5.tar.gz linux-stable-bca237a52ca0035b0a0380003283d8bf590188d5.tar.bz2 linux-stable-bca237a52ca0035b0a0380003283d8bf590188d5.zip |
block/laptop_mode: Convert timers to use timer_setup()
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 <axboe@kernel.dk>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: linux-block@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 8a1551154285..e7095030aa1f 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1993,11 +1993,12 @@ int dirty_writeback_centisecs_handler(struct ctl_table *table, int write, } #ifdef CONFIG_BLOCK -void laptop_mode_timer_fn(unsigned long data) +void laptop_mode_timer_fn(struct timer_list *t) { - struct request_queue *q = (struct request_queue *)data; + struct backing_dev_info *backing_dev_info = + from_timer(backing_dev_info, t, laptop_mode_wb_timer); - wakeup_flusher_threads_bdi(q->backing_dev_info, WB_REASON_LAPTOP_TIMER); + wakeup_flusher_threads_bdi(backing_dev_info, WB_REASON_LAPTOP_TIMER); } /* |