aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2008-03-25 19:07:03 -0400
committerNeil Brown <neilb@suse.de>2008-07-07 20:52:15 -0400
commit13e53df354caea8986df951dcb6353c823e1f858 (patch)
tree16c6c2cde80cea148d467cffe7d08bfee042091e
parent2f9618ce63cb049c5587f5c650f2725c0035aa96 (diff)
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: Andre Noll <maan@systemlinux.org> Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r--drivers/md/md.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 80bcba9951c3..b9d902652a51 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3675,7 +3675,9 @@ static int do_md_run(mddev_t * mddev)
3675 mddev->ro = 2; /* read-only, but switch on first write */ 3675 mddev->ro = 2; /* read-only, but switch on first write */
3676 3676
3677 err = mddev->pers->run(mddev); 3677 err = mddev->pers->run(mddev);
3678 if (!err && mddev->pers->sync_request) { 3678 if (err)
3679 printk(KERN_ERR "md: pers->run() failed ...\n");
3680 else if (mddev->pers->sync_request) {
3679 err = bitmap_create(mddev); 3681 err = bitmap_create(mddev);
3680 if (err) { 3682 if (err) {
3681 printk(KERN_ERR "%s: failed to create bitmap (%d)\n", 3683 printk(KERN_ERR "%s: failed to create bitmap (%d)\n",
@@ -3684,7 +3686,6 @@ static int do_md_run(mddev_t * mddev)
3684 } 3686 }
3685 } 3687 }
3686 if (err) { 3688 if (err) {
3687 printk(KERN_ERR "md: pers->run() failed ...\n");
3688 module_put(mddev->pers->owner); 3689 module_put(mddev->pers->owner);
3689 mddev->pers = NULL; 3690 mddev->pers = NULL;
3690 bitmap_destroy(mddev); 3691 bitmap_destroy(mddev);