Commit 841a2ed9 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

SUNRPC: Set SOFTCONN when destroying GSS contexts

Move the RPC_TASK_SOFTCONN flag into rpc_call_null_helper(). The
only minor behavior change is that it is now also set when
destroying GSS contexts.

This gives a better guarantee that gss_send_destroy_context() will
not hang for long if a connection cannot be established.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 6fc3737a
...@@ -2752,7 +2752,8 @@ struct rpc_task *rpc_call_null_helper(struct rpc_clnt *clnt, ...@@ -2752,7 +2752,8 @@ struct rpc_task *rpc_call_null_helper(struct rpc_clnt *clnt,
.rpc_op_cred = cred, .rpc_op_cred = cred,
.callback_ops = (ops != NULL) ? ops : &rpc_default_ops, .callback_ops = (ops != NULL) ? ops : &rpc_default_ops,
.callback_data = data, .callback_data = data,
.flags = flags | RPC_TASK_SOFT | RPC_TASK_NULLCREDS, .flags = flags | RPC_TASK_SOFT | RPC_TASK_SOFTCONN |
RPC_TASK_NULLCREDS,
}; };
return rpc_run_task(&task_setup_data); return rpc_run_task(&task_setup_data);
...@@ -2815,8 +2816,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, ...@@ -2815,8 +2816,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt,
goto success; goto success;
} }
task = rpc_call_null_helper(clnt, xprt, NULL, task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC,
RPC_TASK_SOFTCONN|RPC_TASK_ASYNC,
&rpc_cb_add_xprt_call_ops, data); &rpc_cb_add_xprt_call_ops, data);
rpc_put_task(task); rpc_put_task(task);
...@@ -2859,8 +2859,7 @@ int rpc_clnt_setup_test_and_add_xprt(struct rpc_clnt *clnt, ...@@ -2859,8 +2859,7 @@ int rpc_clnt_setup_test_and_add_xprt(struct rpc_clnt *clnt,
goto out_err; goto out_err;
/* Test the connection */ /* Test the connection */
task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_SOFTCONN, task = rpc_call_null_helper(clnt, xprt, NULL, 0, NULL, NULL);
NULL, NULL);
if (IS_ERR(task)) { if (IS_ERR(task)) {
status = PTR_ERR(task); status = PTR_ERR(task);
goto out_err; goto out_err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment