Lines Matching refs:ctx
40 int iterate_dir(struct file *file, struct dir_context *ctx) in iterate_dir() argument
63 ctx->pos = file->f_pos; in iterate_dir()
65 res = file->f_op->iterate_shared(file, ctx); in iterate_dir()
67 res = file->f_op->iterate(file, ctx); in iterate_dir()
68 file->f_pos = ctx->pos; in iterate_dir()
138 struct dir_context ctx; member
143 static int fillonedir(struct dir_context *ctx, const char *name, int namlen, in fillonedir() argument
147 container_of(ctx, struct readdir_callback, ctx); in fillonedir()
186 .ctx.actor = fillonedir, in SYSCALL_DEFINE3()
193 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
215 struct dir_context ctx; member
222 static int filldir(struct dir_context *ctx, const char *name, int namlen, in filldir() argument
227 container_of(ctx, struct getdents_callback, ctx); in filldir()
276 .ctx.actor = filldir, in SYSCALL_DEFINE3()
286 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
293 if (put_user(buf.ctx.pos, &lastdirent->d_off)) in SYSCALL_DEFINE3()
303 struct dir_context ctx; member
310 static int filldir64(struct dir_context *ctx, const char *name, int namlen, in filldir64() argument
315 container_of(ctx, struct getdents_callback64, ctx); in filldir64()
359 .ctx.actor = filldir64, in SYSCALL_DEFINE3()
369 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
374 typeof(lastdirent->d_off) d_off = buf.ctx.pos; in SYSCALL_DEFINE3()
395 struct dir_context ctx; member
400 static int compat_fillonedir(struct dir_context *ctx, const char *name, in compat_fillonedir() argument
405 container_of(ctx, struct compat_readdir_callback, ctx); in compat_fillonedir()
444 .ctx.actor = compat_fillonedir, in COMPAT_SYSCALL_DEFINE3()
451 error = iterate_dir(f.file, &buf.ctx); in COMPAT_SYSCALL_DEFINE3()
467 struct dir_context ctx; member
474 static int compat_filldir(struct dir_context *ctx, const char *name, int namlen, in compat_filldir() argument
479 container_of(ctx, struct compat_getdents_callback, ctx); in compat_filldir()
527 .ctx.actor = compat_filldir, in COMPAT_SYSCALL_DEFINE3()
537 error = iterate_dir(f.file, &buf.ctx); in COMPAT_SYSCALL_DEFINE3()
544 if (put_user(buf.ctx.pos, &lastdirent->d_off)) in COMPAT_SYSCALL_DEFINE3()