Lines Matching refs:devs

148 	if (!sbi->devs->flatdev && !dif->path) {  in erofs_init_device()
163 } else if (!sbi->devs->flatdev) { in erofs_init_device()
212 if (sbi->devs->extra_devices && in erofs_scan_devices()
213 ondisk_extradevs != sbi->devs->extra_devices) { in erofs_scan_devices()
215 ondisk_extradevs, sbi->devs->extra_devices); in erofs_scan_devices()
226 if (!sbi->devs->extra_devices && !erofs_is_fscache_mode(sb)) in erofs_scan_devices()
227 sbi->devs->flatdev = true; in erofs_scan_devices()
231 down_read(&sbi->devs->rwsem); in erofs_scan_devices()
232 if (sbi->devs->extra_devices) { in erofs_scan_devices()
233 idr_for_each_entry(&sbi->devs->tree, dif, id) { in erofs_scan_devices()
246 err = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_scan_devices()
251 ++sbi->devs->extra_devices; in erofs_scan_devices()
258 up_read(&sbi->devs->rwsem); in erofs_scan_devices()
493 down_write(&sbi->devs->rwsem); in erofs_fc_parse_param()
494 ret = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_fc_parse_param()
495 up_write(&sbi->devs->rwsem); in erofs_fc_parse_param()
501 ++sbi->devs->extra_devices; in erofs_fc_parse_param()
809 static void erofs_free_dev_context(struct erofs_dev_context *devs) in erofs_free_dev_context() argument
811 if (!devs) in erofs_free_dev_context()
813 idr_for_each(&devs->tree, &erofs_release_device_info, NULL); in erofs_free_dev_context()
814 idr_destroy(&devs->tree); in erofs_free_dev_context()
815 kfree(devs); in erofs_free_dev_context()
820 erofs_free_dev_context(sbi->devs); in erofs_sb_free()
851 sbi->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL); in erofs_init_fs_context()
852 if (!sbi->devs) { in erofs_init_fs_context()
858 idr_init(&sbi->devs->tree); in erofs_init_fs_context()
859 init_rwsem(&sbi->devs->rwsem); in erofs_init_fs_context()
901 erofs_free_dev_context(sbi->devs); in erofs_put_super()
902 sbi->devs = NULL; in erofs_put_super()