Lines Matching refs:dev
97 struct btrfs_device *dev; in btrfs_alloc_dummy_device() local
99 dev = kzalloc(sizeof(*dev), GFP_KERNEL); in btrfs_alloc_dummy_device()
100 if (!dev) in btrfs_alloc_dummy_device()
103 extent_io_tree_init(NULL, &dev->alloc_state, 0, NULL); in btrfs_alloc_dummy_device()
104 INIT_LIST_HEAD(&dev->dev_list); in btrfs_alloc_dummy_device()
105 list_add(&dev->dev_list, &fs_info->fs_devices->devices); in btrfs_alloc_dummy_device()
107 return dev; in btrfs_alloc_dummy_device()
110 static void btrfs_free_dummy_device(struct btrfs_device *dev) in btrfs_free_dummy_device() argument
112 extent_io_tree_release(&dev->alloc_state); in btrfs_free_dummy_device()
113 kfree(dev); in btrfs_free_dummy_device()
155 struct btrfs_device *dev, *tmp; in btrfs_free_dummy_fs_info() local
187 list_for_each_entry_safe(dev, tmp, &fs_info->fs_devices->devices, in btrfs_free_dummy_fs_info()
189 btrfs_free_dummy_device(dev); in btrfs_free_dummy_fs_info()