Lines Matching refs:devs

171 	if (!sbi->devs->flatdev && !dif->path) {  in erofs_init_device()
186 } else if (!sbi->devs->flatdev) { in erofs_init_device()
227 if (sbi->devs->extra_devices && in erofs_scan_devices()
228 ondisk_extradevs != sbi->devs->extra_devices) { in erofs_scan_devices()
230 ondisk_extradevs, sbi->devs->extra_devices); in erofs_scan_devices()
236 if (!sbi->devs->extra_devices && !erofs_is_fscache_mode(sb)) in erofs_scan_devices()
237 sbi->devs->flatdev = true; in erofs_scan_devices()
241 down_read(&sbi->devs->rwsem); in erofs_scan_devices()
242 if (sbi->devs->extra_devices) { in erofs_scan_devices()
243 idr_for_each_entry(&sbi->devs->tree, dif, id) { in erofs_scan_devices()
256 err = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_scan_devices()
261 ++sbi->devs->extra_devices; in erofs_scan_devices()
268 up_read(&sbi->devs->rwsem); in erofs_scan_devices()
500 down_write(&sbi->devs->rwsem); in erofs_fc_parse_param()
501 ret = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_fc_parse_param()
502 up_write(&sbi->devs->rwsem); in erofs_fc_parse_param()
508 ++sbi->devs->extra_devices; in erofs_fc_parse_param()
768 static void erofs_free_dev_context(struct erofs_dev_context *devs) in erofs_free_dev_context() argument
770 if (!devs) in erofs_free_dev_context()
772 idr_for_each(&devs->tree, &erofs_release_device_info, NULL); in erofs_free_dev_context()
773 idr_destroy(&devs->tree); in erofs_free_dev_context()
774 kfree(devs); in erofs_free_dev_context()
784 erofs_free_dev_context(sbi->devs); in erofs_fc_free()
805 sbi->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL); in erofs_init_fs_context()
806 if (!sbi->devs) { in erofs_init_fs_context()
812 idr_init(&sbi->devs->tree); in erofs_init_fs_context()
813 init_rwsem(&sbi->devs->rwsem); in erofs_init_fs_context()
828 erofs_free_dev_context(sbi->devs); in erofs_kill_sb()
854 erofs_free_dev_context(sbi->devs); in erofs_put_super()
855 sbi->devs = NULL; in erofs_put_super()