else if (test_bit(SOCK_NOSPACE, &xprt->sock->flags)) { task->tk_timeout = req->rq_timeout; rpc_sleep_on(&xprt->pending, task, NULL, NULL); } 
else if (test_bit(SOCK_NOSPACE, &xprt->sock->flags)) xprt_wait_for_buffer_space(task); 
static int xs_send_request(struct rpc_task *task){	struct rpc_rqst *req = task->tk_rqstp;	struct rpc_xprt *xprt = req->rq_xprt;	int status, retry = 0;	/* set up everything as needed. */	/* Write the record marker */	if (xprt->stream) {		u32 *marker = req->rq_svec[0].iov_base;		*marker = htonl(0x80000000|(req->rq_slen-sizeof(*marker)));	}	/* Continue transmitting the packet/record. We must be careful	 * to cope with writespace callbacks arriving _after_ we have	 * called sendmsg().	 */	while (1) {		req->rq_xtime = jiffies;		status = xs_sendmsg(xprt, req);		if (status < 0)			break;		if (xprt->stream) {			req->rq_bytes_sent += status;			/* If we've sent the entire packet, immediately			 * reset the count of bytes sent. */			if (req->rq_bytes_sent >= req->rq_slen) {				req->rq_bytes_sent = 0;				return 0;			}		} else {			if (status >= req->rq_slen)				return 0;			status = -EAGAIN;			break;		}		dprintk("RPC: %4d xmit incomplete (%d left of %d)\n",				task->tk_pid, req->rq_slen - req->rq_bytes_sent,				req->rq_slen);		status = -EAGAIN;		if (retry++ > 50)			break;	}	if (status == -EAGAIN) {		if (test_bit(SOCK_ASYNC_NOSPACE, &xprt->sock->flags)) {			/* Protect against races with xs_write_space */			spin_lock_bh(&xprt->transport_lock);			/* Don't race with disconnect */			if (!xprt_connected(xprt))				task->tk_status = -ENOTCONN;			else if (test_bit(SOCK_NOSPACE, &xprt->sock->flags)) {				task->tk_timeout = req->rq_timeout;				rpc_sleep_on(&xprt->pending, task, NULL, NULL);			}			spin_unlock_bh(&xprt->transport_lock);			return status;		}		/* Keep holding the socket if it is blocked */		rpc_delay(task, HZ>>4);	}	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c7b2cae8a634015b72941ba2fc6c4bc9b8d3a129/xprtsock.c/clean/net/sunrpc/xprtsock.c