mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
lockd: discard nlmsvc_timeout
nlmsvc_timeout always has the same value as (nlm_timeout * HZ), so use that in the one place that nlmsvc_timeout is used. In truth it *might* not always be the same as nlmsvc_timeout is only set when lockd is started while nlm_timeout can be set at anytime via sysctl. I think this difference it not helpful so removing it is good. Also remove the test for nlm_timout being 0. This is not possible - unless a module parameter is used to set the minimum timeout to 0, and if that happens then it probably should be honoured. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
8203ab8a9d
commit
4ed9ef3260
@ -440,7 +440,7 @@ nlm_bind_host(struct nlm_host *host)
|
||||
if ((clnt = host->h_rpcclnt) != NULL) {
|
||||
nlm_rebind_host(host);
|
||||
} else {
|
||||
unsigned long increment = nlmsvc_timeout;
|
||||
unsigned long increment = nlm_timeout * HZ;
|
||||
struct rpc_timeout timeparms = {
|
||||
.to_initval = increment,
|
||||
.to_increment = increment,
|
||||
|
@ -53,7 +53,6 @@ EXPORT_SYMBOL_GPL(nlmsvc_ops);
|
||||
static DEFINE_MUTEX(nlmsvc_mutex);
|
||||
static unsigned int nlmsvc_users;
|
||||
static struct svc_serv *nlmsvc_serv;
|
||||
unsigned long nlmsvc_timeout;
|
||||
|
||||
static void nlmsvc_request_retry(struct timer_list *tl)
|
||||
{
|
||||
@ -68,7 +67,7 @@ unsigned int lockd_net_id;
|
||||
* and also changed through the sysctl interface. -- Jamie Lokier, Aug 2003
|
||||
*/
|
||||
static unsigned long nlm_grace_period;
|
||||
static unsigned long nlm_timeout = LOCKD_DFLT_TIMEO;
|
||||
unsigned long nlm_timeout = LOCKD_DFLT_TIMEO;
|
||||
static int nlm_udpport, nlm_tcpport;
|
||||
|
||||
/* RLIM_NOFILE defaults to 1024. That seems like a reasonable default here. */
|
||||
@ -333,10 +332,6 @@ static int lockd_get(void)
|
||||
printk(KERN_WARNING
|
||||
"lockd_up: no pid, %d users??\n", nlmsvc_users);
|
||||
|
||||
if (!nlm_timeout)
|
||||
nlm_timeout = LOCKD_DFLT_TIMEO;
|
||||
nlmsvc_timeout = nlm_timeout * HZ;
|
||||
|
||||
serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, lockd);
|
||||
if (!serv) {
|
||||
printk(KERN_WARNING "lockd_up: create service failed\n");
|
||||
|
@ -200,7 +200,7 @@ extern const struct svc_procedure nlmsvc_procedures[24];
|
||||
extern const struct svc_procedure nlmsvc_procedures4[24];
|
||||
#endif
|
||||
extern int nlmsvc_grace_period;
|
||||
extern unsigned long nlmsvc_timeout;
|
||||
extern unsigned long nlm_timeout;
|
||||
extern bool nsm_use_hostnames;
|
||||
extern u32 nsm_local_state;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user