diff options
author | Dan Williams <dan.j.williams@intel.com> | 2010-07-01 17:36:11 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-07-01 17:36:11 -0700 |
commit | d19e3cfb6627c40e3a28454ebc2098c0e19b9a77 (patch) | |
tree | 362fe9dceb5037be4f48ffc2cf9ddfd9e2635c34 /sysfs.c | |
parent | 8cfc801c72f079618b39d04c2e0fe32adbc2474e (diff) | |
parent | 23eb475a96b1b0cf7f8feaeb7b32355b80e8faa7 (diff) |
Merge branch 'fixes' into for-neil
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -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 */ |