2014-04-15 12:51:55

by Jeff Layton

[permalink] [raw]
Subject: [PATCH] nfsd: set timeparms.to_maxval in setup_callback_client

...otherwise the logic in the timeout handling doesn't work correctly.

Spotted-by: Trond Myklebust <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
---
fs/nfsd/nfs4callback.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 39c8ef875f91..2c73cae9899d 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -654,9 +654,11 @@ static struct rpc_clnt *create_backchannel_client(struct rpc_create_args *args)

static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses)
{
+ int maxtime = max_cb_time(clp->net);
struct rpc_timeout timeparms = {
- .to_initval = max_cb_time(clp->net),
+ .to_initval = maxtime,
.to_retries = 0,
+ .to_maxval = maxtime,
};
struct rpc_create_args args = {
.net = clp->net,
--
1.9.0



2014-04-18 09:10:35

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [PATCH] nfsd: set timeparms.to_maxval in setup_callback_client

On Tue, Apr 15, 2014 at 08:51:48AM -0400, Jeff Layton wrote:
> ...otherwise the logic in the timeout handling doesn't work correctly.
>
> Spotted-by: Trond Myklebust <[email protected]>
> Signed-off-by: Jeff Layton <[email protected]>

Thanks, queueing up for 3.15 and stable.

--b.

> ---
> fs/nfsd/nfs4callback.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 39c8ef875f91..2c73cae9899d 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -654,9 +654,11 @@ static struct rpc_clnt *create_backchannel_client(struct rpc_create_args *args)
>
> static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses)
> {
> + int maxtime = max_cb_time(clp->net);
> struct rpc_timeout timeparms = {
> - .to_initval = max_cb_time(clp->net),
> + .to_initval = maxtime,
> .to_retries = 0,
> + .to_maxval = maxtime,
> };
> struct rpc_create_args args = {
> .net = clp->net,
> --
> 1.9.0
>