Commit e770288c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] md: Don't do_md_stop and array when do_md_run fails.

From: NeilBrown <neilb@cse.unsw.edu.au>

Current code calls do_md_stop to clean up if do_md_run fails, but this is

a/ not needed as do_md_run cleans up itself

b/ bad as it could try to clean up after an -EBUSY error !!!
parent 87d0aa2f
......@@ -2571,19 +2571,8 @@ static int md_ioctl(struct inode *inode, struct file *file,
goto done_unlock;
case RUN_ARRAY:
{
err = do_md_run (mddev);
/*
* we have to clean up the mess if
* the array cannot be run for some
* reason ...
* ->pers will not be set, to superblock will
* not be updated.
*/
if (err)
do_md_stop (mddev, 0);
goto done_unlock;
}
default:
if (_IOC_TYPE(cmd) == MD_MAJOR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment