Skip to content

Commit

Permalink
tcp: rename sk_forced_wmem_schedule() to sk_forced_mem_schedule()
Browse files Browse the repository at this point in the history
We plan to use sk_forced_wmem_schedule() in input path as well,
so make it non static and rename it.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 18, 2015
1 parent 1a24e04 commit a6c5ea4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ static inline bool tcp_out_of_memory(struct sock *sk)
return false;
}

void sk_forced_mem_schedule(struct sock *sk, int size);

static inline bool tcp_too_many_orphans(struct sock *sk, int shift)
{
struct percpu_counter *ocp = sk->sk_prot->orphan_count;
Expand Down
6 changes: 4 additions & 2 deletions net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -2816,8 +2816,10 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
* connection tear down and (memory) recovery.
* Otherwise tcp_send_fin() could be tempted to either delay FIN
* or even be forced to close flow without any FIN.
* In general, we want to allow one skb per socket to avoid hangs
* with edge trigger epoll()
*/
static void sk_forced_wmem_schedule(struct sock *sk, int size)
void sk_forced_mem_schedule(struct sock *sk, int size)
{
int amt, status;

Expand Down Expand Up @@ -2864,7 +2866,7 @@ void tcp_send_fin(struct sock *sk)
return;
}
skb_reserve(skb, MAX_TCP_HEADER);
sk_forced_wmem_schedule(sk, skb->truesize);
sk_forced_mem_schedule(sk, skb->truesize);
/* FIN eats a sequence byte, write_seq advanced by tcp_queue_skb(). */
tcp_init_nondata_skb(skb, tp->write_seq,
TCPHDR_ACK | TCPHDR_FIN);
Expand Down

0 comments on commit a6c5ea4

Please sign in to comment.