]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdstat.c
FIX: array after migration should be unfrozen
[thirdparty/mdadm.git] / mdstat.c
index bac374212e96444ceac9654b360fb9d99fb6a8fa..3d2edadb494dcad1a7db3528e493e60414741d8a 100644 (file)
--- a/mdstat.c
+++ b/mdstat.c
@@ -399,9 +399,9 @@ struct mdstat_ent *mdstat_by_subdev(char *subdev, int container)
                    strncmp(mdstat->metadata_version, "external:", 9) == 0 &&
                    strchr("/-", mdstat->metadata_version[9]) != NULL &&
                    strncmp(mdstat->metadata_version+10, "md", 2) == 0 &&
-                   strtoul(mdstat->metadata_version+11, &pos, 10)
+                   strtoul(mdstat->metadata_version+12, &pos, 10)
                    == (unsigned)container &&
-                   pos > mdstat->metadata_version+11 &&
+                   pos > mdstat->metadata_version+12 &&
                    *pos == '/' &&
                    strcmp(pos+1, subdev) == 0
                        ) {