]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
NFSv4: Convert LOCKU to use nfs4_async_handle_exception()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 7 Nov 2017 16:14:49 +0000 (11:14 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 15 Jan 2018 04:06:29 +0000 (23:06 -0500)
Convert CLOSE so that it specifies the correct stateid and
inode for the error handling.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c

index b704e08b390c4af2c0f43d03e0b65c94d3a38ba9..b927fda32e7408190e63999b461b1a2f72a45916 100644 (file)
@@ -6071,6 +6071,10 @@ static void nfs4_locku_release_calldata(void *data)
 static void nfs4_locku_done(struct rpc_task *task, void *data)
 {
        struct nfs4_unlockdata *calldata = data;
+       struct nfs4_exception exception = {
+               .inode = calldata->lsp->ls_state->inode,
+               .stateid = &calldata->arg.stateid,
+       };
 
        if (!nfs4_sequence_done(task, &calldata->res.seq_res))
                return;
@@ -6094,8 +6098,10 @@ static void nfs4_locku_done(struct rpc_task *task, void *data)
                                rpc_restart_call_prepare(task);
                        break;
                default:
-                       if (nfs4_async_handle_error(task, calldata->server,
-                                                   NULL, NULL) == -EAGAIN)
+                       task->tk_status = nfs4_async_handle_exception(task,
+                                       calldata->server, task->tk_status,
+                                       &exception);
+                       if (exception.retry)
                                rpc_restart_call_prepare(task);
        }
        nfs_release_seqid(calldata->arg.seqid);