Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7a3e3e18e40848b6f01d44407ce86b91b8535fbd
Commit: 7a3e3e18e40848b6f01d44407ce86b91b8535fbd
Parent: ba7392bb37cb12781890f45d7ddee1618e33a036
Author: Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 20 16:03:57 2007 -0500
Committer: Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 02:05:59 2008 -0500
NFS: Ensure that we respect NFS_MAX_TCP_TIMEOUT
It isn't sufficient just to limit timeout->to_initval, we also need to
limit to_maxval.
Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
fs/nfs/client.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 9066133..59a6dcc 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -387,12 +387,16 @@ static void nfs_init_timeout_values(struct rpc_timeout
*to, int proto,
switch (proto) {
case XPRT_TRANSPORT_TCP:
case XPRT_TRANSPORT_RDMA:
- if (!to->to_initval)
+ if (to->to_initval == 0)
to->to_initval = 60 * HZ;
if (to->to_initval > NFS_MAX_TCP_TIMEOUT)
to->to_initval = NFS_MAX_TCP_TIMEOUT;
to->to_increment = to->to_initval;
to->to_maxval = to->to_initval + (to->to_increment *
to->to_retries);
+ if (to->to_maxval > NFS_MAX_TCP_TIMEOUT)
+ to->to_maxval = NFS_MAX_TCP_TIMEOUT;
+ if (to->to_maxval < to->to_initval)
+ to->to_maxval = to->to_initval;
to->to_exponential = 0;
break;
case XPRT_TRANSPORT_UDP:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html