]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Grow.c
Grow: fix can't change bitmap type from none to clustered.
[thirdparty/mdadm.git] / Grow.c
diff --git a/Grow.c b/Grow.c
index 8f5cf07d10d9a22f1545ab85be4cbba76ca508e3..bb5fe45c851cf82c3e476d3063b86c3f2b40c48c 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -429,7 +429,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
                        dv = map_dev(disk.major, disk.minor, 1);
                        if (!dv)
                                continue;
-                       if (((disk.state & (1 << MD_DISK_WRITEMOSTLY)) == 0) &&
+                       if ((disk.state & (1 << MD_DISK_WRITEMOSTLY)) &&
                           (strcmp(s->bitmap_file, "clustered") == 0)) {
                                pr_err("%s disks marked write-mostly are not supported with clustered bitmap\n",devname);
                                free(mdi);