Skip to content

Commit

Permalink
SUNRPC: Allow caller to specify the transport to use
Browse files Browse the repository at this point in the history
This is needed in order to allow the NFSv4.1 backchannel and
BIND_CONN_TO_SESSION function to work.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Feb 5, 2016
1 parent fb43d17 commit 9d61498
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/sunrpc/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ struct rpc_call_ops {
struct rpc_task_setup {
struct rpc_task *task;
struct rpc_clnt *rpc_client;
struct rpc_xprt *rpc_xprt;
const struct rpc_message *rpc_message;
const struct rpc_call_ops *callback_ops;
void *callback_data;
Expand Down
2 changes: 2 additions & 0 deletions net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,8 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta
/* Initialize workqueue for async tasks */
task->tk_workqueue = task_setup_data->workqueue;

task->tk_xprt = xprt_get(task_setup_data->rpc_xprt);

if (task->tk_ops->rpc_call_prepare != NULL)
task->tk_action = rpc_prepare_task;

Expand Down

0 comments on commit 9d61498

Please sign in to comment.