Skip to content

Commit

Permalink
sysctl: Move the implementation into fs/proc/proc_sysctl.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman committed Jan 25, 2012
1 parent de4e83b commit 1f87f0b
Show file tree
Hide file tree
Showing 6 changed files with 625 additions and 641 deletions.
3 changes: 3 additions & 0 deletions fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
*/

#include <linux/proc_fs.h>
struct ctl_table_header;

extern struct proc_dir_entry proc_root;
#ifdef CONFIG_PROC_SYSCTL
extern int proc_sys_init(void);
extern void sysctl_head_put(struct ctl_table_header *head);
#else
static inline void proc_sys_init(void) { }
static inline void sysctl_head_put(struct ctl_table_header *head) { }
#endif
#ifdef CONFIG_NET
extern int proc_net_init(void);
Expand Down
Loading

0 comments on commit 1f87f0b

Please sign in to comment.