md - 6 of 10 - Don't do_md_stop and array when do_md_run fails.
PATCH 1/1 md - 6 of 10 - Don't do_md_stop and array when do_md_run fails.
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 !!!
----------- Diffstat output ------------
./drivers/md/md.c | 15 +-------------- 1 files changed, 1 insertion(+), 14 deletions(-)
drivers/md/md.c renamed from drivers/md/md.c~current~ +1 -14
@@ -1764,10 +1764,8 @@ static void autorun_array(mddev_t *mddevprintk ("\n" ); err =do_md_run (mddev); -if (err) { +if (err)printk (KERN_WARNING "md :do_md_run() returned %d\n" , err); -do_md_stop (mddev,0 ); - } }/*
@@ -2569,19 +2567,8 @@ static int md_ioctl(struct inode *inode, 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 )