diff options
author | Zhilong Liu <zlliu@suse.com> | 2017-04-10 09:15:55 +0300 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-04-10 20:50:24 +0300 |
commit | b670883bb9e55ba63a278d83e034faefc01ce2cf (patch) | |
tree | 9dd671e38507926c396fd20a32e095afdf944087 /drivers/md/md.c | |
parent | 065e519e71b2c1f41936cce75b46b5ab34adb588 (diff) | |
download | linux-b670883bb9e55ba63a278d83e034faefc01ce2cf.tar.xz |
md.c:didn't unlock the mddev before return EINVAL in array_size_store
md.c: it needs to release the mddev lock before
the array_size_store() returns.
Fixes: ab5a98b132fd ("md-cluster: change array_sectors and update size are not supported")
Signed-off-by: Zhilong Liu <zlliu@suse.com>
Reviewed-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.c')
-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 a612b9f83069..5022be183390 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4950,8 +4950,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len) return err; /* cluster raid doesn't support change array_sectors */ - if (mddev_is_clustered(mddev)) + if (mddev_is_clustered(mddev)) { + mddev_unlock(mddev); return -EINVAL; + } if (strncmp(buf, "default", 7) == 0) { if (mddev->pers) |