Skip to content

Commit 1f87f0b

Browse files
committed
sysctl: Move the implementation into fs/proc/proc_sysctl.c
Move the core sysctl code from kernel/sysctl.c and kernel/sysctl_check.c into fs/proc/proc_sysctl.c. Currently sysctl maintenance is hampered by the sysctl implementation being split across 3 files with artificial layering between them. Consolidate the entire sysctl implementation into 1 file so that it is easier to see what is going on and hopefully allowing for simpler maintenance. For functions that are now only used in fs/proc/proc_sysctl.c remove their declarations from sysctl.h and make them static in fs/proc/proc_sysctl.c Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
1 parent de4e83b commit 1f87f0b

6 files changed

Lines changed: 625 additions & 641 deletions

File tree

‎fs/proc/internal.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
*/
1111

1212
#include <linux/proc_fs.h>
13+
struct ctl_table_header;
1314

1415
extern struct proc_dir_entry proc_root;
1516
#ifdef CONFIG_PROC_SYSCTL
1617
extern int proc_sys_init(void);
18+
extern void sysctl_head_put(struct ctl_table_header *head);
1719
#else
1820
static inline void proc_sys_init(void) { }
21+
static inline void sysctl_head_put(struct ctl_table_header *head) { }
1922
#endif
2023
#ifdef CONFIG_NET
2124
extern int proc_net_init(void);

0 commit comments

Comments
 (0)