Skip to content

Commit

Permalink
nfs41: Get the rpc_xprt * from the rpc_rqst instead of the rpc_clnt.
Browse files Browse the repository at this point in the history
Obtain the rpc_xprt from the rpc_rqst so that calls and callback replies
can both use the same code path.  A client needs the rpc_xprt in order
to reply to a callback.

Signed-off-by: Rahul Iyer <iyer@netapp.com>
Signed-off-by: Ricardo Labiaga <ricardo.labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
  • Loading branch information
Rahul Iyer authored and Benny Halevy committed Jun 17, 2009
1 parent 0f91421 commit 343952f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ EXPORT_SYMBOL_GPL(xprt_load_transport);
*/
int xprt_reserve_xprt(struct rpc_task *task)
{
struct rpc_xprt *xprt = task->tk_xprt;
struct rpc_rqst *req = task->tk_rqstp;
struct rpc_xprt *xprt = req->rq_xprt;

if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
if (task == xprt->snd_task)
Expand Down Expand Up @@ -858,7 +858,7 @@ int xprt_prepare_transmit(struct rpc_task *task)

void xprt_end_transmit(struct rpc_task *task)
{
xprt_release_write(task->tk_xprt, task);
xprt_release_write(task->tk_rqstp->rq_xprt, task);
}

/**
Expand Down

0 comments on commit 343952f

Please sign in to comment.