Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

9p: Don't use binary sysctl numbers.

The recent 9p commit: bd238fb431f31989898423c8b6496bc8c4204a86 that
supposedly only moved files also introduced a new 9p sysctl interface
that did not properly register it's sysctl binary numbers.

And since it was only for debugging clearly did not need a binary fast
path in any case. So this patch just remove the binary numbers.

See Documentation/sysctl/ctl_unnumbered.txt for more details.

While I was at it I cleaned up the sysctl initializers a little as
well so there is less to read.

Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Eric W. Biederman and committed by
Linus Torvalds
b053c204 f56d35e7

+8 -13
+8 -13
net/9p/sysctl.c
··· 28 28 #include <linux/init.h> 29 29 #include <net/9p/9p.h> 30 30 31 - enum { 32 - P9_SYSCTL_NET = 487, 33 - P9_SYSCTL_DEBUG = 1, 34 - }; 35 - 36 - static ctl_table p9_table[] = { 31 + static struct ctl_table p9_table[] = { 37 32 #ifdef CONFIG_NET_9P_DEBUG 38 33 { 39 - .ctl_name = P9_SYSCTL_DEBUG, 34 + .ctl_name = CTL_UNNUMBERED, 40 35 .procname = "debug", 41 36 .data = &p9_debug_level, 42 37 .maxlen = sizeof(int), ··· 39 44 .proc_handler = &proc_dointvec 40 45 }, 41 46 #endif 42 - { .ctl_name = 0 }, 47 + {}, 43 48 }; 44 49 45 - static ctl_table p9_net_table[] = { 50 + static struct ctl_table p9_net_table[] = { 46 51 { 47 - .ctl_name = P9_SYSCTL_NET, 52 + .ctl_name = CTL_UNNUMBERED, 48 53 .procname = "9p", 49 54 .maxlen = 0, 50 55 .mode = 0555, 51 56 .child = p9_table, 52 57 }, 53 - { .ctl_name = 0 }, 58 + {}, 54 59 }; 55 60 56 - static ctl_table p9_ctl_table[] = { 61 + static struct ctl_table p9_ctl_table[] = { 57 62 { 58 63 .ctl_name = CTL_NET, 59 64 .procname = "net", ··· 61 66 .mode = 0555, 62 67 .child = p9_net_table, 63 68 }, 64 - { .ctl_name = 0 }, 69 + {}, 65 70 }; 66 71 67 72 static struct ctl_table_header *p9_table_header;