Lines Matching refs:octx
266 void simple_offset_init(struct offset_ctx *octx) in simple_offset_init() argument
268 mt_init_flags(&octx->mt, MT_FLAGS_ALLOC_RANGE); in simple_offset_init()
269 lockdep_set_class(&octx->mt.ma_lock, &simple_offset_lock_class); in simple_offset_init()
270 octx->next_offset = DIR_OFFSET_MIN; in simple_offset_init()
281 int simple_offset_add(struct offset_ctx *octx, struct dentry *dentry) in simple_offset_add() argument
289 ret = mtree_alloc_cyclic(&octx->mt, &offset, dentry, DIR_OFFSET_MIN, in simple_offset_add()
290 LONG_MAX, &octx->next_offset, GFP_KERNEL); in simple_offset_add()
298 static int simple_offset_replace(struct offset_ctx *octx, struct dentry *dentry, in simple_offset_replace() argument
303 ret = mtree_store(&octx->mt, offset, dentry, GFP_KERNEL); in simple_offset_replace()
316 void simple_offset_remove(struct offset_ctx *octx, struct dentry *dentry) in simple_offset_remove() argument
324 mtree_erase(&octx->mt, offset); in simple_offset_remove()
337 struct offset_ctx *octx; in simple_offset_empty() local
346 octx = inode->i_op->get_offset_ctx(inode); in simple_offset_empty()
347 mt_for_each(&octx->mt, child, index, LONG_MAX) { in simple_offset_empty()
448 void simple_offset_destroy(struct offset_ctx *octx) in simple_offset_destroy() argument
450 mtree_destroy(&octx->mt); in simple_offset_destroy()
495 static struct dentry *offset_find_next(struct offset_ctx *octx, loff_t offset) in offset_find_next() argument
497 MA_STATE(mas, &octx->mt, offset, offset); in offset_find_next()
524 struct offset_ctx *octx = inode->i_op->get_offset_ctx(inode); in offset_iterate_dir() local
528 dentry = offset_find_next(octx, ctx->pos); in offset_iterate_dir()