Lines Matching refs:devs
240 if (sbi->devs->extra_devices && in erofs_scan_devices()
241 ondisk_extradevs != sbi->devs->extra_devices) { in erofs_scan_devices()
243 ondisk_extradevs, sbi->devs->extra_devices); in erofs_scan_devices()
251 down_read(&sbi->devs->rwsem); in erofs_scan_devices()
252 if (sbi->devs->extra_devices) { in erofs_scan_devices()
253 idr_for_each_entry(&sbi->devs->tree, dif, id) { in erofs_scan_devices()
266 err = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_scan_devices()
271 ++sbi->devs->extra_devices; in erofs_scan_devices()
278 up_read(&sbi->devs->rwsem); in erofs_scan_devices()
513 down_write(&ctx->devs->rwsem); in erofs_fc_parse_param()
514 ret = idr_alloc(&ctx->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_fc_parse_param()
515 up_write(&ctx->devs->rwsem); in erofs_fc_parse_param()
521 ++ctx->devs->extra_devices; in erofs_fc_parse_param()
611 sbi->devs = ctx->devs; in erofs_fc_fill_super()
612 ctx->devs = NULL; in erofs_fc_fill_super()
770 static void erofs_free_dev_context(struct erofs_dev_context *devs) in erofs_free_dev_context() argument
772 if (!devs) in erofs_free_dev_context()
774 idr_for_each(&devs->tree, &erofs_release_device_info, NULL); in erofs_free_dev_context()
775 idr_destroy(&devs->tree); in erofs_free_dev_context()
776 kfree(devs); in erofs_free_dev_context()
783 erofs_free_dev_context(ctx->devs); in erofs_fc_free()
813 ctx->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL); in erofs_init_fs_context()
814 if (!ctx->devs) { in erofs_init_fs_context()
820 idr_init(&ctx->devs->tree); in erofs_init_fs_context()
821 init_rwsem(&ctx->devs->rwsem); in erofs_init_fs_context()
852 erofs_free_dev_context(sbi->devs); in erofs_kill_sb()