mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
nfsd4: remove unnecessary lease-setting function
This is another layer of indirection that doesn't really buy us anything. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
e46b498c84
commit
f958a1320f
@ -4115,15 +4115,3 @@ nfs4_recoverydir(void)
|
|||||||
{
|
{
|
||||||
return user_recovery_dirname;
|
return user_recovery_dirname;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Called when leasetime is changed.
|
|
||||||
*
|
|
||||||
* nfsd4_lease is protected by nfsd_mutex since it's only really accessed
|
|
||||||
* when nfsd is starting
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
nfs4_reset_lease(time_t leasetime)
|
|
||||||
{
|
|
||||||
nfsd4_lease = leasetime;
|
|
||||||
}
|
|
||||||
|
@ -1219,7 +1219,7 @@ static ssize_t __write_leasetime(struct file *file, char *buf, size_t size)
|
|||||||
return rv;
|
return rv;
|
||||||
if (lease < 10 || lease > 3600)
|
if (lease < 10 || lease > 3600)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
nfs4_reset_lease(lease);
|
nfsd4_lease = lease;
|
||||||
}
|
}
|
||||||
|
|
||||||
return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%ld\n", nfsd4_lease);
|
return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%ld\n", nfsd4_lease);
|
||||||
|
Loading…
Reference in New Issue
Block a user