Skip to content

Commit b670883

Browse files
Zhilong Liushligit
authored andcommitted
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: ab5a98b ("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>
1 parent 065e519 commit b670883

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/md/md.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4950,8 +4950,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len)
49504950
return err;
49514951

49524952
/* cluster raid doesn't support change array_sectors */
4953-
if (mddev_is_clustered(mddev))
4953+
if (mddev_is_clustered(mddev)) {
4954+
mddev_unlock(mddev);
49544955
return -EINVAL;
4956+
}
49554957

49564958
if (strncmp(buf, "default", 7) == 0) {
49574959
if (mddev->pers)

0 commit comments

Comments
 (0)