Commit b1f6b684 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] Don't lock array for START_ARRAY

... as autostart_array does it's own locking.


 ----------- Diffstat output ------------
 ./drivers/md/md.c |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)
parent 579cc8b7
......@@ -2546,6 +2546,20 @@ static int md_ioctl(struct inode *inode, struct file *file,
goto abort;
}
if (cmd == START_ARRAY) {
/* START_ARRAY doesn't need to lock the array as autostart_array
* does the locking, and it could even be a different array
*/
err = autostart_array(val_to_kdev(arg));
if (err) {
printk(KERN_WARNING "md: autostart %s failed!\n",
partition_name(val_to_kdev(arg)));
goto abort;
}
goto done;
}
err = mddev_lock(mddev);
if (err) {
printk(KERN_INFO "md: ioctl lock interrupted, reason %d, cmd %d\n",
......@@ -2583,18 +2597,6 @@ static int md_ioctl(struct inode *inode, struct file *file,
}
goto done_unlock;
case START_ARRAY:
/*
* possibly make it lock the array ...
*/
err = autostart_array(val_to_kdev(arg));
if (err) {
printk(KERN_WARNING "md: autostart %s failed!\n",
partition_name(val_to_kdev(arg)));
goto abort_unlock;
}
goto done_unlock;
default:;
}
......
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