summaryrefslogtreecommitdiff
path: root/sysfs.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-07-01 17:36:11 -0700
committerDan Williams <dan.j.williams@intel.com>2010-07-01 17:36:11 -0700
commitd19e3cfb6627c40e3a28454ebc2098c0e19b9a77 (patch)
tree362fe9dceb5037be4f48ffc2cf9ddfd9e2635c34 /sysfs.c
parent8cfc801c72f079618b39d04c2e0fe32adbc2474e (diff)
parent23eb475a96b1b0cf7f8feaeb7b32355b80e8faa7 (diff)
Merge branch 'fixes' into for-neil
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/sysfs.c b/sysfs.c
index 72c7c5b8..725c90c5 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -273,22 +273,20 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options)
strcpy(dbase, "block/dev");
if (load_sys(fname, buf)) {
+ /* assume this is a stale reference to a hot
+ * removed device
+ */
free(dev);
- if (options & SKIP_GONE_DEVS)
- continue;
- else
- goto abort;
+ continue;
}
sscanf(buf, "%d:%d", &dev->disk.major, &dev->disk.minor);
/* special case check for block devices that can go 'offline' */
- if (options & SKIP_GONE_DEVS) {
- strcpy(dbase, "block/device/state");
- if (load_sys(fname, buf) == 0 &&
- strncmp(buf, "offline", 7) == 0) {
- free(dev);
- continue;
- }
+ strcpy(dbase, "block/device/state");
+ if (load_sys(fname, buf) == 0 &&
+ strncmp(buf, "offline", 7) == 0) {
+ free(dev);
+ continue;
}
/* finally add this disk to the array */