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>
This commit is contained in:
Anand Jain 2015-10-22 11:58:05 +08:00 committed by David Sterba
parent 0c90ac0872
commit aa075c07c0

View File

@ -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);