summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysfs.c b/sysfs.c
index bf5c8c5d..df6fdda3 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -307,6 +307,7 @@ struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options)
dev->disk.raid_disk = strtoul(buf, &ep, 10);
if (*ep) dev->disk.raid_disk = -1;
+ sra->array.nr_disks++;
strcpy(dbase, "block/dev");
if (load_sys(fname, buf, sizeof(buf))) {
/* assume this is a stale reference to a hot
@@ -315,7 +316,6 @@ struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options)
free(dev);
continue;
}
- sra->array.nr_disks++;
sscanf(buf, "%d:%d", &dev->disk.major, &dev->disk.minor);
/* special case check for block devices that can go 'offline' */