]> asedeno.scripts.mit.edu Git - linux.git/commit
sysctl: Move sysctl_check_dups into insert_header
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 19 Jan 2012 06:57:15 +0000 (22:57 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:40:30 +0000 (16:40 -0800)
commite54012cede6749528899f66a72312522a179d427
tree13fe8f0b968da3fcb349e2867d80dfd2e3f5ef9d
parent60a47a2e823cbe6b609346bffff61a00c0c76470
sysctl: Move sysctl_check_dups into insert_header

Simplify the callers of insert_header by removing explicit calls to check
for duplicates and instead have insert_header do the work.

This makes the code slightly more maintainable by enabling changes to
data structures where the insertion of new entries without duplicate
suppression is not possible.

There is not always a convenient path string where insert_header
is called so modify sysctl_check_dups to use sysctl_print_dir
when printing the full path when a duplicate is discovered.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/proc/proc_sysctl.c