From ab09203e302b6e526f6930f3e460064b0f253ae9 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Thu, 5 Nov 2009 14:25:10 -0800 Subject: sysctl fs: Remove dead binary sysctl support Now that sys_sysctl is a generic wrapper around /proc/sys .ctl_name and .strategy members of sysctl tables are dead code. Remove them. Cc: Jan Harkes Signed-off-by: Eric W. Biederman --- fs/quota/dquot.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'fs/quota') diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 39b49c42a7ed..60940f8709d6 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2473,7 +2473,6 @@ const struct quotactl_ops vfs_quotactl_ops = { static ctl_table fs_dqstats_table[] = { { - .ctl_name = FS_DQ_LOOKUPS, .procname = "lookups", .data = &dqstats.lookups, .maxlen = sizeof(int), @@ -2481,7 +2480,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_DROPS, .procname = "drops", .data = &dqstats.drops, .maxlen = sizeof(int), @@ -2489,7 +2487,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_READS, .procname = "reads", .data = &dqstats.reads, .maxlen = sizeof(int), @@ -2497,7 +2494,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_WRITES, .procname = "writes", .data = &dqstats.writes, .maxlen = sizeof(int), @@ -2505,7 +2501,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_CACHE_HITS, .procname = "cache_hits", .data = &dqstats.cache_hits, .maxlen = sizeof(int), @@ -2513,7 +2508,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_ALLOCATED, .procname = "allocated_dquots", .data = &dqstats.allocated_dquots, .maxlen = sizeof(int), @@ -2521,7 +2515,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_FREE, .procname = "free_dquots", .data = &dqstats.free_dquots, .maxlen = sizeof(int), @@ -2529,7 +2522,6 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, { - .ctl_name = FS_DQ_SYNCS, .procname = "syncs", .data = &dqstats.syncs, .maxlen = sizeof(int), @@ -2538,7 +2530,6 @@ static ctl_table fs_dqstats_table[] = { }, #ifdef CONFIG_PRINT_QUOTA_WARNING { - .ctl_name = FS_DQ_WARNINGS, .procname = "warnings", .data = &flag_print_warnings, .maxlen = sizeof(int), @@ -2546,27 +2537,25 @@ static ctl_table fs_dqstats_table[] = { .proc_handler = &proc_dointvec, }, #endif - { .ctl_name = 0 }, + { }, }; static ctl_table fs_table[] = { { - .ctl_name = FS_DQSTATS, .procname = "quota", .mode = 0555, .child = fs_dqstats_table, }, - { .ctl_name = 0 }, + { }, }; static ctl_table sys_table[] = { { - .ctl_name = CTL_FS, .procname = "fs", .mode = 0555, .child = fs_table, }, - { .ctl_name = 0 }, + { }, }; static int __init dquot_init(void) -- cgit v1.2.2 From 6d4561110a3e9fa742aeec6717248a491dfb1878 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Mon, 16 Nov 2009 03:11:48 -0800 Subject: sysctl: Drop & in front of every proc_handler. For consistency drop & in front of every proc_handler. Explicity taking the address is unnecessary and it prevents optimizations like stubbing the proc_handlers to NULL. Cc: Alexey Dobriyan Cc: Ingo Molnar Cc: Joe Perches Signed-off-by: Eric W. Biederman --- fs/quota/dquot.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fs/quota') diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 60940f8709d6..f0eb200d8f8e 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2477,56 +2477,56 @@ static ctl_table fs_dqstats_table[] = { .data = &dqstats.lookups, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "drops", .data = &dqstats.drops, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "reads", .data = &dqstats.reads, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "writes", .data = &dqstats.writes, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "cache_hits", .data = &dqstats.cache_hits, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "allocated_dquots", .data = &dqstats.allocated_dquots, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "free_dquots", .data = &dqstats.free_dquots, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, { .procname = "syncs", .data = &dqstats.syncs, .maxlen = sizeof(int), .mode = 0444, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, #ifdef CONFIG_PRINT_QUOTA_WARNING { @@ -2534,7 +2534,7 @@ static ctl_table fs_dqstats_table[] = { .data = &flag_print_warnings, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = &proc_dointvec, + .proc_handler = proc_dointvec, }, #endif { }, -- cgit v1.2.2