summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/volumes.c b/volumes.c
index 437e219a..0ff22833 100644
--- a/volumes.c
+++ b/volumes.c
@@ -1631,10 +1631,10 @@ static int read_one_dev(struct btrfs_root *root,
if (!device) {
printk("warning devid %llu not found already\n",
(unsigned long long)devid);
- device = kmalloc(sizeof(*device), GFP_NOFS);
+ device = kzalloc(sizeof(*device), GFP_NOFS);
if (!device)
return -ENOMEM;
- device->total_ios = 0;
+ device->fd = -1;
list_add(&device->dev_list,
&root->fs_info->fs_devices->devices);
}