u32 limit = tcp_window_allows(tp, skb, mss_now, cwnd_quota); 
limit = tcp_window_allows(tp, skb, mss_now, cwnd_quota); 
static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle){	struct tcp_sock *tp = tcp_sk(sk);	struct sk_buff *skb;	unsigned int tso_segs, sent_pkts;	int cwnd_quota;	/* If we are closed, the bytes will have to remain here.	 * In time closedown will finish, we empty the write queue and all	 * will be happy.	 */	if (unlikely(sk->sk_state == TCP_CLOSE))		return 0;	sent_pkts = 0;	while ((skb = sk->sk_send_head)) {		tso_segs = tcp_init_tso_segs(sk, skb, mss_now);		BUG_ON(!tso_segs);		cwnd_quota = tcp_cwnd_test(tp, skb);		if (!cwnd_quota)			break;		if (unlikely(!tcp_snd_wnd_test(tp, skb, mss_now)))			break;		if (tso_segs == 1) {			if (unlikely(!tcp_nagle_test(tp, skb, mss_now,						     (tcp_skb_is_last(sk, skb) ?						      nonagle : TCP_NAGLE_PUSH))))				break;		} else {			if (tcp_tso_should_defer(sk, tp, skb))				break;		}		if (tso_segs > 1) {			u32 limit = tcp_window_allows(tp, skb,						      mss_now, cwnd_quota);			if (skb->len < limit) {				unsigned int trim = skb->len % mss_now;				if (trim)					limit = skb->len - trim;			}			if (skb->len > limit) {				if (tso_fragment(sk, skb, limit, mss_now))					break;			}		} else if (unlikely(skb->len > mss_now)) {			if (unlikely(tcp_fragment(sk, skb,  mss_now, mss_now)))				break;		}		TCP_SKB_CB(skb)->when = tcp_time_stamp;		if (unlikely(tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC))))			break;		/* Advance the send_head.  This one is sent out.		 * This call will increment packets_out.		 */		update_send_head(sk, tp, skb);		tcp_minshall_update(tp, mss_now, skb);		sent_pkts++;	}	if (likely(sent_pkts)) {		tcp_cwnd_validate(sk, tp);		return 0;	}	return !tp->packets_out && sk->sk_send_head;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/35d59efd105b3b7c1b5878dcc9d1749f41f9740f/tcp_output.c/buggy/net/ipv4/tcp_output.c