summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2015-10-22 11:58:05 +0800
committerDavid Sterba <dsterba@suse.com>2015-11-02 09:35:06 +0100
commitaa075c07c09a1d8f36e7a62d6db173d29068624d (patch)
treec1524f407d7c5619456ae044b262049e8e44b28d
parent0c90ac0872594d3f6abfa4a91c5c68bd50ad4472 (diff)
btrfs-progs: fix missing initialization of list head for dev_list
Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 7ac62f40..cd11091e 100644
--- a/utils.c
+++ b/utils.c
@@ -763,6 +763,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
if (!device->name)
goto err_nomem;
+ INIT_LIST_HEAD(&device->dev_list);
ret = btrfs_add_device(trans, root, device);
BUG_ON(ret);