Lines Matching defs:fc
36 void fuse_backing_files_init(struct fuse_conn *fc)
38 idr_init(&fc->backing_files_map);
41 static int fuse_backing_id_alloc(struct fuse_conn *fc, struct fuse_backing *fb)
46 spin_lock(&fc->lock);
48 id = idr_alloc_cyclic(&fc->backing_files_map, fb, 1, 0, GFP_ATOMIC);
49 spin_unlock(&fc->lock);
56 static struct fuse_backing *fuse_backing_id_remove(struct fuse_conn *fc,
61 spin_lock(&fc->lock);
62 fb = idr_remove(&fc->backing_files_map, id);
63 spin_unlock(&fc->lock);
77 void fuse_backing_files_free(struct fuse_conn *fc)
79 idr_for_each(&fc->backing_files_map, fuse_backing_id_free, NULL);
80 idr_destroy(&fc->backing_files_map);
83 int fuse_backing_open(struct fuse_conn *fc, struct fuse_backing_map *map)
94 if (!fc->passthrough || !capable(CAP_SYS_ADMIN))
113 if (backing_sb->s_stack_depth >= fc->max_stack_depth)
125 res = fuse_backing_id_alloc(fc, fb);
141 int fuse_backing_close(struct fuse_conn *fc, int backing_id)
150 if (!fc->passthrough || !capable(CAP_SYS_ADMIN))
158 fb = fuse_backing_id_remove(fc, backing_id);
170 struct fuse_backing *fuse_backing_lookup(struct fuse_conn *fc, int backing_id)
175 fb = idr_find(&fc->backing_files_map, backing_id);