out_receive: dprintk("RPC: %4d xmit complete\n", task->tk_pid); /* Set the task's receive timeout value */ spin_lock_bh(&xprt->transport_lock); if (!xprt->nocong) { int timer = task->tk_msg.rpc_proc->p_timer; task->tk_timeout = rpc_calc_rto(clnt->cl_rtt, timer); task->tk_timeout <<= rpc_ntimeo(clnt->cl_rtt, timer) + req->rq_retries; if (task->tk_timeout > xprt->timeout.to_maxval || task->tk_timeout == 0) task->tk_timeout = xprt->timeout.to_maxval; } else task->tk_timeout = req->rq_timeout; /* Don't race with disconnect */ if (!xprt_connected(xprt)) task->tk_status = -ENOTCONN; else if (!req->rq_received) rpc_sleep_on(&xprt->pending, task, NULL, xprt_timer); __xprt_release_write(xprt, task); spin_unlock_bh(&xprt->transport_lock); 
void xprt_transmit(struct rpc_task *task){	struct rpc_clnt *clnt = task->tk_client;	struct rpc_rqst	*req = task->tk_rqstp;	struct rpc_xprt	*xprt = req->rq_xprt;	int status;	dprintk("RPC: %4d xprt_transmit(%u)\n", task->tk_pid, req->rq_slen);	smp_rmb();	if (!req->rq_received) {		if (list_empty(&req->rq_list)) {			spin_lock_bh(&xprt->transport_lock);			/* Update the softirq receive buffer */			memcpy(&req->rq_private_buf, &req->rq_rcv_buf,					sizeof(req->rq_private_buf));			/* Add request to the receive list */			list_add_tail(&req->rq_list, &xprt->recv);			spin_unlock_bh(&xprt->transport_lock);			xprt_reset_majortimeo(req);			/* Turn off autodisconnect */			del_singleshot_timer_sync(&xprt->timer);		}	} else if (!req->rq_bytes_sent)		return;	status = xprt->ops->send_request(task);	if (!status)		goto out_receive;	/* Note: at this point, task->tk_sleeping has not yet been set,	 *	 hence there is no danger of the waking up task being put on	 *	 schedq, and being picked up by a parallel run of rpciod().	 */	task->tk_status = status;	switch (status) {	case -ECONNREFUSED:		task->tk_timeout = RPC_REESTABLISH_TIMEOUT;		rpc_sleep_on(&xprt->sending, task, NULL, NULL);	case -EAGAIN:	case -ENOTCONN:		return;	default:		break;	}	xprt_release_write(xprt, task);	return; out_receive:	dprintk("RPC: %4d xmit complete\n", task->tk_pid);	/* Set the task's receive timeout value */	spin_lock_bh(&xprt->transport_lock);	if (!xprt->nocong) {		int timer = task->tk_msg.rpc_proc->p_timer;		task->tk_timeout = rpc_calc_rto(clnt->cl_rtt, timer);		task->tk_timeout <<= rpc_ntimeo(clnt->cl_rtt, timer) + req->rq_retries;		if (task->tk_timeout > xprt->timeout.to_maxval || task->tk_timeout == 0)			task->tk_timeout = xprt->timeout.to_maxval;	} else		task->tk_timeout = req->rq_timeout;	/* Don't race with disconnect */	if (!xprt_connected(xprt))		task->tk_status = -ENOTCONN;	else if (!req->rq_received)		rpc_sleep_on(&xprt->pending, task, NULL, xprt_timer);	__xprt_release_write(xprt, task);	spin_unlock_bh(&xprt->transport_lock);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/fe3aca290f17ae4978bd73d02aa4029f1c9c024c/xprt.c/clean/net/sunrpc/xprt.c