summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-io.c b/disk-io.c
index 46a5a46..1d48893 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -266,7 +266,7 @@ int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int mirr
}
device = multi->stripes[0].dev;
- if (device->fd == 0) {
+ if (device->fd <= 0) {
kfree(multi);
return -EIO;
}
@@ -385,7 +385,7 @@ int read_extent_data(struct btrfs_root *root, char *data,
}
device = multi->stripes[0].dev;
- if (device->fd == 0)
+ if (device->fd <= 0)
goto err;
if (*len > max_len)
*len = max_len;