]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFSv4: Fix retry issues with nfs41_test/free_stateid
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 22 Sep 2016 17:39:19 +0000 (13:39 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 27 Sep 2016 18:35:23 +0000 (14:35 -0400)
_nfs41_free_stateid() needs to be cached by the session, but
nfs41_test_stateid() may return NFS4ERR_RETRY_UNCACHED_REP (in which
case we should just retry).

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index fdd7faceaf22b69bcb9bf95f276cae3f113759ba..79109c84f18d1dc157e1b4ddc365ddbfd91a4677 100644 (file)
@@ -8929,6 +8929,7 @@ static void nfs4_handle_delay_or_session_error(struct nfs_server *server,
        exception->retry = 0;
        switch(err) {
        case -NFS4ERR_DELAY:
+       case -NFS4ERR_RETRY_UNCACHED_REP:
                nfs4_handle_exception(server, err, exception);
                break;
        case -NFS4ERR_BADSESSION:
@@ -9034,7 +9035,7 @@ static struct rpc_task *_nfs41_free_stateid(struct nfs_server *server,
 
        msg.rpc_argp = &data->args;
        msg.rpc_resp = &data->res;
-       nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0);
+       nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 1);
        if (privileged)
                nfs4_set_sequence_privileged(&data->args.seq_args);