Lines Matching refs:devs
276 if (ondisk_extradevs != sbi->devs->extra_devices) { in erofs_init_devices()
278 ondisk_extradevs, sbi->devs->extra_devices); in erofs_init_devices()
286 down_read(&sbi->devs->rwsem); in erofs_init_devices()
287 idr_for_each_entry(&sbi->devs->tree, dif, id) { in erofs_init_devices()
300 up_read(&sbi->devs->rwsem); in erofs_init_devices()
322 up_read(&sbi->devs->rwsem); in erofs_init_devices()
552 down_write(&ctx->devs->rwsem); in erofs_fc_parse_param()
553 ret = idr_alloc(&ctx->devs->tree, dif, 0, 0, GFP_KERNEL); in erofs_fc_parse_param()
554 up_write(&ctx->devs->rwsem); in erofs_fc_parse_param()
560 ++ctx->devs->extra_devices; in erofs_fc_parse_param()
648 sbi->devs = ctx->devs; in erofs_fc_fill_super()
649 ctx->devs = NULL; in erofs_fc_fill_super()
738 static void erofs_free_dev_context(struct erofs_dev_context *devs) in erofs_free_dev_context() argument
740 if (!devs) in erofs_free_dev_context()
742 idr_for_each(&devs->tree, &erofs_release_device_info, NULL); in erofs_free_dev_context()
743 idr_destroy(&devs->tree); in erofs_free_dev_context()
744 kfree(devs); in erofs_free_dev_context()
751 erofs_free_dev_context(ctx->devs); in erofs_fc_free()
768 ctx->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL); in erofs_init_fs_context()
769 if (!ctx->devs) { in erofs_init_fs_context()
775 idr_init(&ctx->devs->tree); in erofs_init_fs_context()
776 init_rwsem(&ctx->devs->rwsem); in erofs_init_fs_context()
798 erofs_free_dev_context(sbi->devs); in erofs_kill_sb()