Lines Matching refs:devs
185 if (!sbi->devs->flatdev && !dif->path) {
200 } else if (!sbi->devs->flatdev) {
233 if (sbi->devs->extra_devices &&
234 ondisk_extradevs != sbi->devs->extra_devices) {
236 ondisk_extradevs, sbi->devs->extra_devices);
242 if (!sbi->devs->extra_devices && !erofs_is_fscache_mode(sb))
243 sbi->devs->flatdev = true;
247 down_read(&sbi->devs->rwsem);
248 if (sbi->devs->extra_devices) {
249 idr_for_each_entry(&sbi->devs->tree, dif, id) {
262 err = idr_alloc(&sbi->devs->tree, dif, 0, 0, GFP_KERNEL);
267 ++sbi->devs->extra_devices;
274 up_read(&sbi->devs->rwsem);
505 down_write(&ctx->devs->rwsem);
506 ret = idr_alloc(&ctx->devs->tree, dif, 0, 0, GFP_KERNEL);
507 up_write(&ctx->devs->rwsem);
513 ++ctx->devs->extra_devices;
596 sbi->devs = ctx->devs;
597 ctx->devs = NULL;
750 static void erofs_free_dev_context(struct erofs_dev_context *devs)
752 if (!devs)
754 idr_for_each(&devs->tree, &erofs_release_device_info, NULL);
755 idr_destroy(&devs->tree);
756 kfree(devs);
763 erofs_free_dev_context(ctx->devs);
783 ctx->devs = kzalloc(sizeof(struct erofs_dev_context), GFP_KERNEL);
784 if (!ctx->devs) {
790 idr_init(&ctx->devs->tree);
791 init_rwsem(&ctx->devs->rwsem);
810 erofs_free_dev_context(sbi->devs);
834 erofs_free_dev_context(sbi->devs);
835 sbi->devs = NULL;