提交 13e53df3 编写于 作者: A Andre Noll 提交者: Neil Brown

md: do_md_run(): Fix misleading error message.

In case pers->run() succeeds but creating the bitmap fails, we
print an error message stating that pers->run() has failed.

Print this message only if pers->run() really failed.
Signed-off-by: NAndre Noll <maan@systemlinux.org>
Signed-off-by: NNeil Brown <neilb@suse.de>
上级 2f9618ce
......@@ -3675,7 +3675,9 @@ static int do_md_run(mddev_t * mddev)
mddev->ro = 2; /* read-only, but switch on first write */
err = mddev->pers->run(mddev);
if (!err && mddev->pers->sync_request) {
if (err)
printk(KERN_ERR "md: pers->run() failed ...\n");
else if (mddev->pers->sync_request) {
err = bitmap_create(mddev);
if (err) {
printk(KERN_ERR "%s: failed to create bitmap (%d)\n",
......@@ -3684,7 +3686,6 @@ static int do_md_run(mddev_t * mddev)
}
}
if (err) {
printk(KERN_ERR "md: pers->run() failed ...\n");
module_put(mddev->pers->owner);
mddev->pers = NULL;
bitmap_destroy(mddev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册