/* xprt_prepare_transmit - reserve the transport before sending a request @task: RPC task about to send a request  */
int xprt_prepare_transmit(struct rpc_task *task)
/* xprt_prepare_transmit - reserve the transport before sending a request @task: RPC task about to send a request  */
int xprt_prepare_transmit(struct rpc_task *task)
{
	struct rpc_rqst	*req = task->tk_rqstp;
	struct rpc_xprt	*xprt = req->rq_xprt;
	int err = 0;
	dprintk("RPC: %5u xprt_prepare_transmit\n", task->tk_pid);
	spin_lock_bh(&xprt->transport_lock);
	if (req->rq_reply_bytes_recvd && !req->rq_bytes_sent) {
		err = req->rq_reply_bytes_recvd;
		goto out_unlock;
	}
	if (!xprt->ops->reserve_xprt(task))
		err = -EAGAIN;
out_unlock:
	spin_unlock_bh(&xprt->transport_lock);
	return err;
}