Lines Matching refs:ctx
1961 struct cgroup_fs_context *ctx = cgroup_fc2context(fc); in cgroup2_parse_param() local
1971 ctx->flags |= CGRP_ROOT_NS_DELEGATE; in cgroup2_parse_param()
1974 ctx->flags |= CGRP_ROOT_FAVOR_DYNMODS; in cgroup2_parse_param()
1977 ctx->flags |= CGRP_ROOT_MEMORY_LOCAL_EVENTS; in cgroup2_parse_param()
1980 ctx->flags |= CGRP_ROOT_MEMORY_RECURSIVE_PROT; in cgroup2_parse_param()
1983 ctx->flags |= CGRP_ROOT_MEMORY_HUGETLB_ACCOUNTING; in cgroup2_parse_param()
1986 ctx->flags |= CGRP_ROOT_PIDS_LOCAL_EVENTS; in cgroup2_parse_param()
1994 struct cgroup_file_ctx *ctx = of->priv; in of_peak() local
1996 return &ctx->peak; in of_peak()
2051 struct cgroup_fs_context *ctx = cgroup_fc2context(fc); in cgroup_reconfigure() local
2053 apply_cgroup_root_flags(ctx->flags); in cgroup_reconfigure()
2086 void init_cgroup_root(struct cgroup_fs_context *ctx) in init_cgroup_root() argument
2088 struct cgroup_root *root = ctx->root; in init_cgroup_root()
2097 root->flags = ctx->flags & ~CGRP_ROOT_FAVOR_DYNMODS; in init_cgroup_root()
2098 if (ctx->release_agent) in init_cgroup_root()
2099 strscpy(root->release_agent_path, ctx->release_agent, PATH_MAX); in init_cgroup_root()
2100 if (ctx->name) in init_cgroup_root()
2101 strscpy(root->name, ctx->name, MAX_CGROUP_ROOT_NAMELEN); in init_cgroup_root()
2102 if (ctx->cpuset_clone_children) in init_cgroup_root()
2213 struct cgroup_fs_context *ctx = cgroup_fc2context(fc); in cgroup_do_get_tree() local
2216 ctx->kfc.root = ctx->root->kf_root; in cgroup_do_get_tree()
2218 ctx->kfc.magic = CGROUP2_SUPER_MAGIC; in cgroup_do_get_tree()
2220 ctx->kfc.magic = CGROUP_SUPER_MAGIC; in cgroup_do_get_tree()
2227 if (!ret && ctx->ns != &init_cgroup_ns) { in cgroup_do_get_tree()
2235 cgrp = cset_cgroup_from_root(ctx->ns->root_cset, ctx->root); in cgroup_do_get_tree()
2250 if (!ctx->kfc.new_sb_created) in cgroup_do_get_tree()
2251 cgroup_put(&ctx->root->cgrp); in cgroup_do_get_tree()
2261 struct cgroup_fs_context *ctx = cgroup_fc2context(fc); in cgroup_fs_context_free() local
2263 kfree(ctx->name); in cgroup_fs_context_free()
2264 kfree(ctx->release_agent); in cgroup_fs_context_free()
2265 put_cgroup_ns(ctx->ns); in cgroup_fs_context_free()
2267 kfree(ctx); in cgroup_fs_context_free()
2272 struct cgroup_fs_context *ctx = cgroup_fc2context(fc); in cgroup_get_tree() local
2277 ctx->root = &cgrp_dfl_root; in cgroup_get_tree()
2281 apply_cgroup_root_flags(ctx->flags); in cgroup_get_tree()
2305 struct cgroup_fs_context *ctx; in cgroup_init_fs_context() local
2307 ctx = kzalloc(sizeof(struct cgroup_fs_context), GFP_KERNEL); in cgroup_init_fs_context()
2308 if (!ctx) in cgroup_init_fs_context()
2311 ctx->ns = current->nsproxy->cgroup_ns; in cgroup_init_fs_context()
2312 get_cgroup_ns(ctx->ns); in cgroup_init_fs_context()
2313 fc->fs_private = &ctx->kfc; in cgroup_init_fs_context()
2319 fc->user_ns = get_user_ns(ctx->ns->user_ns); in cgroup_init_fs_context()
2323 ctx->flags |= CGRP_ROOT_FAVOR_DYNMODS; in cgroup_init_fs_context()
2374 struct cgroup_fs_context *ctx = cgroup_fc2context(fc); in cpuset_parse_param() local
2384 ctx->flags |= CGRP_ROOT_CPUSET_V2_MODE; in cpuset_parse_param()
2404 struct cgroup_fs_context *ctx; in cpuset_init_fs_context() local
2415 ctx = cgroup_fc2context(fc); in cpuset_init_fs_context()
2416 ctx->subsys_mask = 1 << cpuset_cgrp_id; in cpuset_init_fs_context()
2417 ctx->flags |= CGRP_ROOT_NOPREFIX; in cpuset_init_fs_context()
2418 ctx->release_agent = agent; in cpuset_init_fs_context()
3876 struct cgroup_file_ctx *ctx = of->priv; in pressure_write() local
3889 if (ctx->psi.trigger) { in pressure_write()
3901 smp_store_release(&ctx->psi.trigger, new); in pressure_write()
3996 struct cgroup_file_ctx *ctx = of->priv; in cgroup_pressure_poll() local
3998 return psi_trigger_poll(&ctx->psi.trigger, of->file, pt); in cgroup_pressure_poll()
4003 struct cgroup_file_ctx *ctx = of->priv; in cgroup_pressure_release() local
4005 psi_trigger_destroy(ctx->psi.trigger); in cgroup_pressure_release()
4131 struct cgroup_file_ctx *ctx; in cgroup_file_open() local
4134 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); in cgroup_file_open()
4135 if (!ctx) in cgroup_file_open()
4138 ctx->ns = current->nsproxy->cgroup_ns; in cgroup_file_open()
4139 get_cgroup_ns(ctx->ns); in cgroup_file_open()
4140 of->priv = ctx; in cgroup_file_open()
4147 put_cgroup_ns(ctx->ns); in cgroup_file_open()
4148 kfree(ctx); in cgroup_file_open()
4156 struct cgroup_file_ctx *ctx = of->priv; in cgroup_file_release() local
4160 put_cgroup_ns(ctx->ns); in cgroup_file_release()
4161 kfree(ctx); in cgroup_file_release()
4167 struct cgroup_file_ctx *ctx = of->priv; in cgroup_file_write() local
4184 ctx->ns != &init_cgroup_ns && ctx->ns->root_cset->dfl_cgrp == cgrp) in cgroup_file_write()
5102 struct cgroup_file_ctx *ctx = of->priv; in cgroup_procs_release() local
5104 if (ctx->procs.started) in cgroup_procs_release()
5105 css_task_iter_end(&ctx->procs.iter); in cgroup_procs_release()
5111 struct cgroup_file_ctx *ctx = of->priv; in cgroup_procs_next() local
5116 return css_task_iter_next(&ctx->procs.iter); in cgroup_procs_next()
5124 struct cgroup_file_ctx *ctx = of->priv; in __cgroup_procs_start() local
5125 struct css_task_iter *it = &ctx->procs.iter; in __cgroup_procs_start()
5131 if (!ctx->procs.started) { in __cgroup_procs_start()
5135 ctx->procs.started = true; in __cgroup_procs_start()
5239 struct cgroup_file_ctx *ctx = of->priv; in __cgroup_procs_write() local
5268 threadgroup, ctx->ns); in __cgroup_procs_write()
6181 static struct cgroup_fs_context __initdata ctx; in cgroup_init_early() local
6185 ctx.root = &cgrp_dfl_root; in cgroup_init_early()
6186 init_cgroup_root(&ctx); in cgroup_init_early()