md: setup safemode_timer before it's being used
authorSasha Levin <sasha.levin@oracle.com>
Fri, 24 Jul 2015 22:19:58 +0000 (18:19 -0400)
committerNeilBrown <neilb@suse.com>
Mon, 31 Aug 2015 17:39:39 +0000 (19:39 +0200)
commit25b2edfa3b6940b73180d2735cd19fdf58d0cf91
treee696c04cdb531172cb3eda7a623a1b1129878eab
parent6cbd81487f7cfa30e22537bf7cd07f48c4e7164d
md: setup safemode_timer before it's being used

We used to set up the safemode_timer timer in md_run. If md_run
would fail before the timer was set up we'd end up trying to modify
a timer that doesn't have a callback function when we access safe_delay_store,
which would trigger a BUG.

neilb: delete init_timer() call as setup_timer() does that.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md.c