Lines Matching refs:devs

238 	if (!sbi->devs->flatdev && !dif->path) {  in erofs_init_device()
253 } else if (!sbi->devs->flatdev) { in erofs_init_device()
286 if (sbi->devs->extra_devices && in erofs_scan_devices()
287 ondisk_extradevs != sbi->devs->extra_devices) { in erofs_scan_devices()
289 ondisk_extradevs, sbi->devs->extra_devices); in erofs_scan_devices()
295 if (!sbi->devs->extra_devices && !erofs_is_fscache_mode(sb)) in erofs_scan_devices()
296 sbi->devs->flatdev = true; in erofs_scan_devices()
300 down_read(&sbi->devs->rwsem); in erofs_scan_devices()
301 if (sbi->devs->extra_devices) { in erofs_scan_devices()
302 idr_for_each_entry(&sbi->devs->tree, dif, id) { in erofs_scan_devices()
315 err = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_scan_devices()
320 ++sbi->devs->extra_devices; in erofs_scan_devices()
327 up_read(&sbi->devs->rwsem); in erofs_scan_devices()
561 down_write(&ctx->devs->rwsem); in erofs_fc_parse_param()
562 ret = idr_alloc(&ctx->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_fc_parse_param()
563 up_write(&ctx->devs->rwsem); in erofs_fc_parse_param()
569 ++ctx->devs->extra_devices; in erofs_fc_parse_param()
659 sbi->devs = ctx->devs; in erofs_fc_fill_super()
660 ctx->devs = NULL; in erofs_fc_fill_super()
818 static void erofs_free_dev_context(struct erofs_dev_context *devs) in erofs_free_dev_context() argument
820 if (!devs) in erofs_free_dev_context()
822 idr_for_each(&devs->tree, &erofs_release_device_info, NULL); in erofs_free_dev_context()
823 idr_destroy(&devs->tree); in erofs_free_dev_context()
824 kfree(devs); in erofs_free_dev_context()
831 erofs_free_dev_context(ctx->devs); in erofs_fc_free()
861 ctx->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL); in erofs_init_fs_context()
862 if (!ctx->devs) { in erofs_init_fs_context()
868 idr_init(&ctx->devs->tree); in erofs_init_fs_context()
869 init_rwsem(&ctx->devs->rwsem); in erofs_init_fs_context()
894 erofs_free_dev_context(sbi->devs); in erofs_kill_sb()
918 erofs_free_dev_context(sbi->devs); in erofs_put_super()
919 sbi->devs = NULL; in erofs_put_super()