diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfsctl.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 7ab70ff212d8..413cb8ef951b 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -1208,9 +1208,6 @@ static ssize_t write_maxblksize(struct file *file, char *buf, size_t size) | |||
1208 | #ifdef CONFIG_NFSD_V4 | 1208 | #ifdef CONFIG_NFSD_V4 |
1209 | static ssize_t __nfsd4_write_time(struct file *file, char *buf, size_t size, time_t *time) | 1209 | static ssize_t __nfsd4_write_time(struct file *file, char *buf, size_t size, time_t *time) |
1210 | { | 1210 | { |
1211 | /* if size > 10 seconds, call | ||
1212 | * nfs4_reset_lease() then write out the new lease (seconds) as reply | ||
1213 | */ | ||
1214 | char *mesg = buf; | 1211 | char *mesg = buf; |
1215 | int rv, i; | 1212 | int rv, i; |
1216 | 1213 | ||
@@ -1220,6 +1217,18 @@ static ssize_t __nfsd4_write_time(struct file *file, char *buf, size_t size, tim | |||
1220 | rv = get_int(&mesg, &i); | 1217 | rv = get_int(&mesg, &i); |
1221 | if (rv) | 1218 | if (rv) |
1222 | return rv; | 1219 | return rv; |
1220 | /* | ||
1221 | * Some sanity checking. We don't have a reason for | ||
1222 | * these particular numbers, but problems with the | ||
1223 | * extremes are: | ||
1224 | * - Too short: the briefest network outage may | ||
1225 | * cause clients to lose all their locks. Also, | ||
1226 | * the frequent polling may be wasteful. | ||
1227 | * - Too long: do you really want reboot recovery | ||
1228 | * to take more than an hour? Or to make other | ||
1229 | * clients wait an hour before being able to | ||
1230 | * revoke a dead client's locks? | ||
1231 | */ | ||
1223 | if (i < 10 || i > 3600) | 1232 | if (i < 10 || i > 3600) |
1224 | return -EINVAL; | 1233 | return -EINVAL; |
1225 | *time = i; | 1234 | *time = i; |