diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2018-11-28 10:05:58 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-12-19 13:52:44 -0500 |
commit | 8e2e5b7c492639109b1137c286dbad529c2b35e1 (patch) | |
tree | 951806e988d42593b511fc92c2db580113ccc421 /net/sunrpc/xprtsock.c | |
parent | ac0aa5e843ca06ae55886dbbd2a1032d9b78b6bc (diff) |
SUNRPC: allow /proc entries without CONFIG_SUNRPC_DEBUG
If we want /proc/sys/sunrpc the current kernel also drags in other debug
features which we don't really want. Instead, we should always show the
following entries:
/proc/sys/sunrpc/udp_slot_table_entries
/proc/sys/sunrpc/tcp_slot_table_entries
/proc/sys/sunrpc/tcp_max_slot_table_entries
/proc/sys/sunrpc/min_resvport
/proc/sys/sunrpc/max_resvport
/proc/sys/sunrpc/tcp_fin_timeout
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index f0b3700cec95..a6870d3cb121 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -68,8 +68,6 @@ static unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE; | |||
68 | static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT; | 68 | static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT; |
69 | static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT; | 69 | static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT; |
70 | 70 | ||
71 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | ||
72 | |||
73 | #define XS_TCP_LINGER_TO (15U * HZ) | 71 | #define XS_TCP_LINGER_TO (15U * HZ) |
74 | static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; | 72 | static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; |
75 | 73 | ||
@@ -159,8 +157,6 @@ static struct ctl_table sunrpc_table[] = { | |||
159 | { }, | 157 | { }, |
160 | }; | 158 | }; |
161 | 159 | ||
162 | #endif | ||
163 | |||
164 | /* | 160 | /* |
165 | * Wait duration for a reply from the RPC portmapper. | 161 | * Wait duration for a reply from the RPC portmapper. |
166 | */ | 162 | */ |
@@ -3107,10 +3103,8 @@ static struct xprt_class xs_bc_tcp_transport = { | |||
3107 | */ | 3103 | */ |
3108 | int init_socket_xprt(void) | 3104 | int init_socket_xprt(void) |
3109 | { | 3105 | { |
3110 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | ||
3111 | if (!sunrpc_table_header) | 3106 | if (!sunrpc_table_header) |
3112 | sunrpc_table_header = register_sysctl_table(sunrpc_table); | 3107 | sunrpc_table_header = register_sysctl_table(sunrpc_table); |
3113 | #endif | ||
3114 | 3108 | ||
3115 | xprt_register_transport(&xs_local_transport); | 3109 | xprt_register_transport(&xs_local_transport); |
3116 | xprt_register_transport(&xs_udp_transport); | 3110 | xprt_register_transport(&xs_udp_transport); |
@@ -3126,12 +3120,10 @@ int init_socket_xprt(void) | |||
3126 | */ | 3120 | */ |
3127 | void cleanup_socket_xprt(void) | 3121 | void cleanup_socket_xprt(void) |
3128 | { | 3122 | { |
3129 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) | ||
3130 | if (sunrpc_table_header) { | 3123 | if (sunrpc_table_header) { |
3131 | unregister_sysctl_table(sunrpc_table_header); | 3124 | unregister_sysctl_table(sunrpc_table_header); |
3132 | sunrpc_table_header = NULL; | 3125 | sunrpc_table_header = NULL; |
3133 | } | 3126 | } |
3134 | #endif | ||
3135 | 3127 | ||
3136 | xprt_unregister_transport(&xs_local_transport); | 3128 | xprt_unregister_transport(&xs_local_transport); |
3137 | xprt_unregister_transport(&xs_udp_transport); | 3129 | xprt_unregister_transport(&xs_udp_transport); |