diff options
author | Andre Noll <maan@systemlinux.org> | 2008-03-26 00:07:03 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-08 10:52:15 +1000 |
commit | 13e53df354caea8986df951dcb6353c823e1f858 (patch) | |
tree | 16c6c2cde80cea148d467cffe7d08bfee042091e /drivers/md | |
parent | 2f9618ce63cb049c5587f5c650f2725c0035aa96 (diff) | |
download | op-kernel-dev-13e53df354caea8986df951dcb6353c823e1f858.zip op-kernel-dev-13e53df354caea8986df951dcb6353c823e1f858.tar.gz |
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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 80bcba9..b9d9026 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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); |