Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9969
b: refs/heads/master
c: 5e5ce5b
h: refs/heads/master
i:
  9967: f4a003c
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 18, 2005
1 parent fa34105 commit 5fc6f70
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea635a517e350eb03ab5f01618417f31b82a9a4d
refs/heads/master: 5e5ce5be6f0161d2a069a4f8a1154fe639c5c02f
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ int xprt_reserve_xprt(struct rpc_task *task);
int xprt_reserve_xprt_cong(struct rpc_task *task);
int xprt_prepare_transmit(struct rpc_task *task);
void xprt_transmit(struct rpc_task *task);
void xprt_abort_transmit(struct rpc_task *task);
int xprt_adjust_timeout(struct rpc_rqst *req);
void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task);
void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task);
Expand Down
23 changes: 12 additions & 11 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,13 +678,11 @@ call_allocate(struct rpc_task *task)
static void
call_encode(struct rpc_task *task)
{
struct rpc_clnt *clnt = task->tk_client;
struct rpc_rqst *req = task->tk_rqstp;
struct xdr_buf *sndbuf = &req->rq_snd_buf;
struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
unsigned int bufsiz;
kxdrproc_t encode;
int status;
u32 *p;

dprintk("RPC: %4d call_encode (status %d)\n",
Expand Down Expand Up @@ -712,12 +710,9 @@ call_encode(struct rpc_task *task)
rpc_exit(task, -EIO);
return;
}
if (encode && (status = rpcauth_wrap_req(task, encode, req, p,
task->tk_msg.rpc_argp)) < 0) {
printk(KERN_WARNING "%s: can't encode arguments: %d\n",
clnt->cl_protname, -status);
rpc_exit(task, status);
}
if (encode != NULL)
task->tk_status = rpcauth_wrap_req(task, encode, req, p,
task->tk_msg.rpc_argp);
}

/*
Expand Down Expand Up @@ -865,17 +860,23 @@ call_transmit(struct rpc_task *task)
if (task->tk_status != 0)
return;
/* Encode here so that rpcsec_gss can use correct sequence number. */
if (!task->tk_rqstp->rq_bytes_sent)
if (task->tk_rqstp->rq_bytes_sent == 0) {
call_encode(task);
if (task->tk_status < 0)
return;
/* Did the encode result in an error condition? */
if (task->tk_status != 0)
goto out_nosend;
}
xprt_transmit(task);
if (task->tk_status < 0)
return;
if (!task->tk_msg.rpc_proc->p_decode) {
task->tk_action = NULL;
rpc_wake_up_task(task);
}
return;
out_nosend:
/* release socket write lock before attempting to handle error */
xprt_abort_transmit(task);
}

/*
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,14 @@ int xprt_prepare_transmit(struct rpc_task *task)
return err;
}

void
xprt_abort_transmit(struct rpc_task *task)
{
struct rpc_xprt *xprt = task->tk_xprt;

xprt_release_write(xprt, task);
}

/**
* xprt_transmit - send an RPC request on a transport
* @task: controlling RPC task
Expand Down

0 comments on commit 5fc6f70

Please sign in to comment.