Lines Matching full:devs

137 	if (!sbi->devs->flatdev && !dif->path) {  in erofs_init_device()
152 } else if (!sbi->devs->flatdev) { in erofs_init_device()
201 if (sbi->devs->extra_devices && in erofs_scan_devices()
202 ondisk_extradevs != sbi->devs->extra_devices) { in erofs_scan_devices()
204 ondisk_extradevs, sbi->devs->extra_devices); in erofs_scan_devices()
215 if (!sbi->devs->extra_devices && !erofs_is_fscache_mode(sb)) in erofs_scan_devices()
216 sbi->devs->flatdev = true; in erofs_scan_devices()
220 down_read(&sbi->devs->rwsem); in erofs_scan_devices()
221 if (sbi->devs->extra_devices) { in erofs_scan_devices()
222 idr_for_each_entry(&sbi->devs->tree, dif, id) { in erofs_scan_devices()
235 err = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_scan_devices()
240 ++sbi->devs->extra_devices; in erofs_scan_devices()
247 up_read(&sbi->devs->rwsem); in erofs_scan_devices()
498 down_write(&sbi->devs->rwsem); in erofs_fc_parse_param()
499 ret = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_fc_parse_param()
500 up_write(&sbi->devs->rwsem); in erofs_fc_parse_param()
506 ++sbi->devs->extra_devices; in erofs_fc_parse_param()
854 static void erofs_free_dev_context(struct erofs_dev_context *devs) in erofs_free_dev_context() argument
856 if (!devs) in erofs_free_dev_context()
858 idr_for_each(&devs->tree, &erofs_release_device_info, NULL); in erofs_free_dev_context()
859 idr_destroy(&devs->tree); in erofs_free_dev_context()
860 kfree(devs); in erofs_free_dev_context()
865 erofs_free_dev_context(sbi->devs); in erofs_sb_free()
897 sbi->devs = kzalloc_obj(struct erofs_dev_context); in erofs_init_fs_context()
898 if (!sbi->devs) { in erofs_init_fs_context()
904 idr_init(&sbi->devs->tree); in erofs_init_fs_context()
905 init_rwsem(&sbi->devs->rwsem); in erofs_init_fs_context()
947 erofs_free_dev_context(sbi->devs); in erofs_put_super()
948 sbi->devs = NULL; in erofs_put_super()