]> git.baikalelectronics.ru Git - kernel.git/commitdiff
SUNRPC: RPC level errors should set task->tk_rpc_status
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 3 Aug 2022 18:55:03 +0000 (14:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:40 +0000 (10:27 +0200)
[ Upstream commit 719705c99359d1af5664a4a375b01c3875e2329f ]

Fix up a case in call_encode() where we're failing to set
task->tk_rpc_status when an RPC level error occurred.

Fixes: a989f67e022f ("SUNRPC: task should be exit if encode return EKEYEXPIRED more times")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/clnt.c

index 08e1ccc01e983297556efd7ffb38020a918aad5c..1893203cc94fc4e9768f7b89079dd99e5d4a62aa 100644 (file)
@@ -1896,7 +1896,7 @@ call_encode(struct rpc_task *task)
                        break;
                case -EKEYEXPIRED:
                        if (!task->tk_cred_retry) {
-                               rpc_exit(task, task->tk_status);
+                               rpc_call_rpcerror(task, task->tk_status);
                        } else {
                                task->tk_action = call_refresh;
                                task->tk_cred_retry--;