linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] writeback: use setup_deferrable_timer
       [not found] <4f458f31907933052ee1c1a78107e1331980986f.1488070459.git.geliangtang@gmail.com>
@ 2017-02-26  0:58 ` Geliang Tang
  0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2017-02-26  0:58 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Mel Gorman, Michal Hocko, Jens Axboe
  Cc: Geliang Tang, linux-mm, linux-kernel

Use setup_deferrable_timer() instead of init_timer_deferrable() to
simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 mm/page-writeback.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 26a6081..9e7d576 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -649,9 +649,8 @@ int wb_domain_init(struct wb_domain *dom, gfp_t gfp)
 
 	spin_lock_init(&dom->lock);
 
-	init_timer_deferrable(&dom->period_timer);
-	dom->period_timer.function = writeout_period;
-	dom->period_timer.data = (unsigned long)dom;
+	setup_deferrable_timer(&dom->period_timer, writeout_period,
+			       (unsigned long)dom);
 
 	dom->dirty_limit_tstamp = jiffies;
 
-- 
2.9.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-26  0:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4f458f31907933052ee1c1a78107e1331980986f.1488070459.git.geliangtang@gmail.com>
2017-02-26  0:58 ` [PATCH] writeback: use setup_deferrable_timer Geliang Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox