root.c (96cafb9ccb153f6a82ff2c9bde68916d9d65501e) | root.c (d7167b149943e38ad610191ecbb0800c78bbced9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/proc/root.c 4 * 5 * Copyright (C) 1991, 1992 Linus Torvalds 6 * 7 * proc root directory handling functions 8 */ --- 27 unchanged lines hidden (view full) --- 36 int gid; 37}; 38 39enum proc_param { 40 Opt_gid, 41 Opt_hidepid, 42}; 43 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/proc/root.c 4 * 5 * Copyright (C) 1991, 1992 Linus Torvalds 6 * 7 * proc root directory handling functions 8 */ --- 27 unchanged lines hidden (view full) --- 36 int gid; 37}; 38 39enum proc_param { 40 Opt_gid, 41 Opt_hidepid, 42}; 43 |
44static const struct fs_parameter_spec proc_param_specs[] = { | 44static const struct fs_parameter_spec proc_fs_parameters[] = { |
45 fsparam_u32("gid", Opt_gid), 46 fsparam_u32("hidepid", Opt_hidepid), 47 {} 48}; 49 | 45 fsparam_u32("gid", Opt_gid), 46 fsparam_u32("hidepid", Opt_hidepid), 47 {} 48}; 49 |
50static const struct fs_parameter_description proc_fs_parameters = { 51 .specs = proc_param_specs, 52}; 53 | |
54static int proc_parse_param(struct fs_context *fc, struct fs_parameter *param) 55{ 56 struct proc_fs_context *ctx = fc->fs_private; 57 struct fs_parse_result result; 58 int opt; 59 | 50static int proc_parse_param(struct fs_context *fc, struct fs_parameter *param) 51{ 52 struct proc_fs_context *ctx = fc->fs_private; 53 struct fs_parse_result result; 54 int opt; 55 |
60 opt = fs_parse(fc, &proc_fs_parameters, param, &result); | 56 opt = fs_parse(fc, proc_fs_parameters, param, &result); |
61 if (opt < 0) 62 return opt; 63 64 switch (opt) { 65 case Opt_gid: 66 ctx->gid = result.uint_32; 67 break; 68 --- 132 unchanged lines hidden (view full) --- 201 dput(ns->proc_thread_self); 202 kill_anon_super(sb); 203 put_pid_ns(ns); 204} 205 206static struct file_system_type proc_fs_type = { 207 .name = "proc", 208 .init_fs_context = proc_init_fs_context, | 57 if (opt < 0) 58 return opt; 59 60 switch (opt) { 61 case Opt_gid: 62 ctx->gid = result.uint_32; 63 break; 64 --- 132 unchanged lines hidden (view full) --- 197 dput(ns->proc_thread_self); 198 kill_anon_super(sb); 199 put_pid_ns(ns); 200} 201 202static struct file_system_type proc_fs_type = { 203 .name = "proc", 204 .init_fs_context = proc_init_fs_context, |
209 .parameters = &proc_fs_parameters, | 205 .parameters = proc_fs_parameters, |
210 .kill_sb = proc_kill_sb, 211 .fs_flags = FS_USERNS_MOUNT | FS_DISALLOW_NOTIFY_PERM, 212}; 213 214void __init proc_root_init(void) 215{ 216 proc_init_kmemcache(); 217 set_proc_pid_nlink(); --- 117 unchanged lines hidden --- | 206 .kill_sb = proc_kill_sb, 207 .fs_flags = FS_USERNS_MOUNT | FS_DISALLOW_NOTIFY_PERM, 208}; 209 210void __init proc_root_init(void) 211{ 212 proc_init_kmemcache(); 213 set_proc_pid_nlink(); --- 117 unchanged lines hidden --- |