diff options
author | NeilBrown <neilb@suse.de> | 2015-06-25 17:06:40 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-03 09:29:13 -0700 |
commit | 0f9457afe159aee56f80b20fff27a6af60f2b7a1 (patch) | |
tree | 71833c5b60eb4200005989ce462c1210d4b1fda7 /drivers/md | |
parent | adeb846a6d8fdc8b9dc19a65393382838cad727f (diff) |
md: unlock mddev_lock on an error path.
commit 9a8c0fa861e4db60409b4dda254cef5e17e4d43c upstream.
This error path retuns while still holding the lock - bad.
Fixes: 6791875e2e53 ("md: make reconfig_mutex optional for writes to md sysfs files.")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 5b7c914908cd..fbe6ac1eea5a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4005,8 +4005,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) |