Lines Matching refs:fc

55 static int proc_parse_param(struct fs_context *fc, struct fs_parameter *param)  in proc_parse_param()  argument
57 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_param()
61 opt = fs_parse(fc, &proc_fs_parameters, param, &result); in proc_parse_param()
74 return invalf(fc, "proc: hidepid value must be between 0 and 2.\n"); in proc_parse_param()
86 struct fs_context *fc, in proc_apply_options() argument
90 struct proc_fs_context *ctx = fc->fs_private; in proc_apply_options()
98 static int proc_fill_super(struct super_block *s, struct fs_context *fc) in proc_fill_super() argument
104 proc_apply_options(s, fc, pid_ns, current_user_ns()); in proc_fill_super()
145 static int proc_reconfigure(struct fs_context *fc) in proc_reconfigure() argument
147 struct super_block *sb = fc->root->d_sb; in proc_reconfigure()
152 proc_apply_options(sb, fc, pid, current_user_ns()); in proc_reconfigure()
156 static int proc_get_tree(struct fs_context *fc) in proc_get_tree() argument
158 struct proc_fs_context *ctx = fc->fs_private; in proc_get_tree()
160 return get_tree_keyed(fc, proc_fill_super, ctx->pid_ns); in proc_get_tree()
163 static void proc_fs_context_free(struct fs_context *fc) in proc_fs_context_free() argument
165 struct proc_fs_context *ctx = fc->fs_private; in proc_fs_context_free()
178 static int proc_init_fs_context(struct fs_context *fc) in proc_init_fs_context() argument
187 put_user_ns(fc->user_ns); in proc_init_fs_context()
188 fc->user_ns = get_user_ns(ctx->pid_ns->user_ns); in proc_init_fs_context()
189 fc->fs_private = ctx; in proc_init_fs_context()
190 fc->ops = &proc_fs_context_ops; in proc_init_fs_context()
304 struct fs_context *fc; in pid_ns_prepare_proc() local
307 fc = fs_context_for_mount(&proc_fs_type, SB_KERNMOUNT); in pid_ns_prepare_proc()
308 if (IS_ERR(fc)) in pid_ns_prepare_proc()
309 return PTR_ERR(fc); in pid_ns_prepare_proc()
311 if (fc->user_ns != ns->user_ns) { in pid_ns_prepare_proc()
312 put_user_ns(fc->user_ns); in pid_ns_prepare_proc()
313 fc->user_ns = get_user_ns(ns->user_ns); in pid_ns_prepare_proc()
316 ctx = fc->fs_private; in pid_ns_prepare_proc()
323 mnt = fc_mount(fc); in pid_ns_prepare_proc()
324 put_fs_context(fc); in pid_ns_prepare_proc()