aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/svc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 252d80163d02..bc3c3cb62db5 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -62,6 +62,9 @@ static unsigned long nlm_timeout = LOCKD_DFLT_TIMEO;
62static int nlm_udpport, nlm_tcpport; 62static int nlm_udpport, nlm_tcpport;
63int nsm_use_hostnames = 0; 63int nsm_use_hostnames = 0;
64 64
65/* RLIM_NOFILE defaults to 1024. That seems like a reasonable default here. */
66static unsigned int nlm_max_connections = 1024;
67
65/* 68/*
66 * Constants needed for the sysctl interface. 69 * Constants needed for the sysctl interface.
67 */ 70 */
@@ -143,6 +146,9 @@ lockd(void *vrqstp)
143 long timeout = MAX_SCHEDULE_TIMEOUT; 146 long timeout = MAX_SCHEDULE_TIMEOUT;
144 RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); 147 RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
145 148
149 /* update sv_maxconn if it has changed */
150 rqstp->rq_server->sv_maxconn = nlm_max_connections;
151
146 if (signalled()) { 152 if (signalled()) {
147 flush_signals(current); 153 flush_signals(current);
148 if (nlmsvc_ops) { 154 if (nlmsvc_ops) {
@@ -276,6 +282,7 @@ int lockd_up(void)
276 } 282 }
277 283
278 svc_sock_update_bufs(serv); 284 svc_sock_update_bufs(serv);
285 serv->sv_maxconn = nlm_max_connections;
279 286
280 nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, serv->sv_name); 287 nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, serv->sv_name);
281 if (IS_ERR(nlmsvc_task)) { 288 if (IS_ERR(nlmsvc_task)) {
@@ -485,6 +492,7 @@ module_param_call(nlm_udpport, param_set_port, param_get_int,
485module_param_call(nlm_tcpport, param_set_port, param_get_int, 492module_param_call(nlm_tcpport, param_set_port, param_get_int,
486 &nlm_tcpport, 0644); 493 &nlm_tcpport, 0644);
487module_param(nsm_use_hostnames, bool, 0644); 494module_param(nsm_use_hostnames, bool, 0644);
495module_param(nlm_max_connections, uint, 0644);
488 496
489/* 497/*
490 * Initialising and terminating the module. 498 * Initialising and terminating the module.