md: unlock mddev_lock on an error path.
This error path retuns while still holding the lock - bad.
Fixes: 6791875e2e
("md: make reconfig_mutex optional for writes to md sysfs files.")
Cc: stable@vger.kernel.org (v4.0+)
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
parent
bd6919228d
commit
9a8c0fa861
1 changed files with 3 additions and 1 deletions
|
@ -4014,8 +4014,10 @@ new_dev_store(struct mddev *mddev, const char *buf, size_t len)
|
|||
else
|
||||
rdev = md_import_device(dev, -1, -1);
|
||||
|
||||
if (IS_ERR(rdev))
|
||||
if (IS_ERR(rdev)) {
|
||||
mddev_unlock(mddev);
|
||||
return PTR_ERR(rdev);
|
||||
}
|
||||
err = bind_rdev_to_array(rdev, mddev);
|
||||
out:
|
||||
if (err)
|
||||
|
|
Loading…
Reference in a new issue