summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index d6e57da56c94..b03bfa055c08 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -634,7 +634,6 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
634 new->cl_discrtry = clnt->cl_discrtry; 634 new->cl_discrtry = clnt->cl_discrtry;
635 new->cl_chatty = clnt->cl_chatty; 635 new->cl_chatty = clnt->cl_chatty;
636 new->cl_principal = clnt->cl_principal; 636 new->cl_principal = clnt->cl_principal;
637 new->cl_cred = get_cred(clnt->cl_cred);
638 return new; 637 return new;
639 638
640out_err: 639out_err:
@@ -2288,13 +2287,13 @@ call_status(struct rpc_task *task)
2288 case -ECONNREFUSED: 2287 case -ECONNREFUSED:
2289 case -ECONNRESET: 2288 case -ECONNRESET:
2290 case -ECONNABORTED: 2289 case -ECONNABORTED:
2290 case -ENOTCONN:
2291 rpc_force_rebind(clnt); 2291 rpc_force_rebind(clnt);
2292 /* fall through */ 2292 /* fall through */
2293 case -EADDRINUSE: 2293 case -EADDRINUSE:
2294 rpc_delay(task, 3*HZ); 2294 rpc_delay(task, 3*HZ);
2295 /* fall through */ 2295 /* fall through */
2296 case -EPIPE: 2296 case -EPIPE:
2297 case -ENOTCONN:
2298 case -EAGAIN: 2297 case -EAGAIN:
2299 break; 2298 break;
2300 case -EIO: 2299 case -EIO:
@@ -2426,17 +2425,21 @@ call_decode(struct rpc_task *task)
2426 return; 2425 return;
2427 case -EAGAIN: 2426 case -EAGAIN:
2428 task->tk_status = 0; 2427 task->tk_status = 0;
2429 /* Note: rpc_decode_header() may have freed the RPC slot */ 2428 xdr_free_bvec(&req->rq_rcv_buf);
2430 if (task->tk_rqstp == req) { 2429 req->rq_reply_bytes_recvd = 0;
2431 xdr_free_bvec(&req->rq_rcv_buf); 2430 req->rq_rcv_buf.len = 0;
2432 req->rq_reply_bytes_recvd = 0; 2431 if (task->tk_client->cl_discrtry)
2433 req->rq_rcv_buf.len = 0; 2432 xprt_conditional_disconnect(req->rq_xprt,
2434 if (task->tk_client->cl_discrtry) 2433 req->rq_connect_cookie);
2435 xprt_conditional_disconnect(req->rq_xprt,
2436 req->rq_connect_cookie);
2437 }
2438 task->tk_action = call_encode; 2434 task->tk_action = call_encode;
2439 rpc_check_timeout(task); 2435 rpc_check_timeout(task);
2436 break;
2437 case -EKEYREJECTED:
2438 task->tk_action = call_reserve;
2439 rpc_check_timeout(task);
2440 rpcauth_invalcred(task);
2441 /* Ensure we obtain a new XID if we retry! */
2442 xprt_release(task);
2440 } 2443 }
2441} 2444}
2442 2445
@@ -2572,11 +2575,7 @@ out_msg_denied:
2572 break; 2575 break;
2573 task->tk_cred_retry--; 2576 task->tk_cred_retry--;
2574 trace_rpc__stale_creds(task); 2577 trace_rpc__stale_creds(task);
2575 rpcauth_invalcred(task); 2578 return -EKEYREJECTED;
2576 /* Ensure we obtain a new XID! */
2577 xprt_release(task);
2578 task->tk_action = call_reserve;
2579 return -EAGAIN;
2580 case rpc_autherr_badcred: 2579 case rpc_autherr_badcred:
2581 case rpc_autherr_badverf: 2580 case rpc_autherr_badverf:
2582 /* possibly garbled cred/verf? */ 2581 /* possibly garbled cred/verf? */
@@ -2805,6 +2804,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
2805 xprt = xprt_iter_xprt(&clnt->cl_xpi); 2804 xprt = xprt_iter_xprt(&clnt->cl_xpi);
2806 if (xps == NULL || xprt == NULL) { 2805 if (xps == NULL || xprt == NULL) {
2807 rcu_read_unlock(); 2806 rcu_read_unlock();
2807 xprt_switch_put(xps);
2808 return -EAGAIN; 2808 return -EAGAIN;
2809 } 2809 }
2810 resvport = xprt->resvport; 2810 resvport = xprt->resvport;