md: simplify the code with md_kick_rdev_from_array

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
This commit is contained in:
Guoqing Jiang 2016-06-02 23:32:05 -04:00 committed by Shaohua Li
parent bb8bf15bd6
commit db76767213

View File

@ -2478,8 +2478,7 @@ static int add_bound_rdev(struct md_rdev *rdev)
if (add_journal)
mddev_resume(mddev);
if (err) {
unbind_rdev_from_array(rdev);
export_rdev(rdev);
md_kick_rdev_from_array(rdev);
return err;
}
}