diff options
author | Sorin Dumitru <sorin@returnze.ro> | 2014-07-22 14:16:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-23 16:23:06 -0400 |
commit | 274f482d33a309c87096f2983601ceda2761094e (patch) | |
tree | daaf79b42277f9f6fc69b66ae59934ef25b0ab42 | |
parent | 52c4f0ec662bbf02f1b0bcb311a48af2c8e5ee89 (diff) |
sock: remove skb argument from sk_rcvqueues_full
It hasn't been used since commit 0fd7bac(net: relax rcvbuf limits).
Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/sock.h | 5 | ||||
-rw-r--r-- | net/core/sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 28f734601b50..720773304a85 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -810,8 +810,7 @@ static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
810 | * Do not take into account this skb truesize, | 810 | * Do not take into account this skb truesize, |
811 | * to allow even a single big packet to come. | 811 | * to allow even a single big packet to come. |
812 | */ | 812 | */ |
813 | static inline bool sk_rcvqueues_full(const struct sock *sk, const struct sk_buff *skb, | 813 | static inline bool sk_rcvqueues_full(const struct sock *sk, unsigned int limit) |
814 | unsigned int limit) | ||
815 | { | 814 | { |
816 | unsigned int qsize = sk->sk_backlog.len + atomic_read(&sk->sk_rmem_alloc); | 815 | unsigned int qsize = sk->sk_backlog.len + atomic_read(&sk->sk_rmem_alloc); |
817 | 816 | ||
@@ -822,7 +821,7 @@ static inline bool sk_rcvqueues_full(const struct sock *sk, const struct sk_buff | |||
822 | static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb, | 821 | static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb, |
823 | unsigned int limit) | 822 | unsigned int limit) |
824 | { | 823 | { |
825 | if (sk_rcvqueues_full(sk, skb, limit)) | 824 | if (sk_rcvqueues_full(sk, limit)) |
826 | return -ENOBUFS; | 825 | return -ENOBUFS; |
827 | 826 | ||
828 | __sk_add_backlog(sk, skb); | 827 | __sk_add_backlog(sk, skb); |
diff --git a/net/core/sock.c b/net/core/sock.c index 026e01f70274..ca9b65199d28 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -491,7 +491,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested) | |||
491 | 491 | ||
492 | skb->dev = NULL; | 492 | skb->dev = NULL; |
493 | 493 | ||
494 | if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) { | 494 | if (sk_rcvqueues_full(sk, sk->sk_rcvbuf)) { |
495 | atomic_inc(&sk->sk_drops); | 495 | atomic_inc(&sk->sk_drops); |
496 | goto discard_and_relse; | 496 | goto discard_and_relse; |
497 | } | 497 | } |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index f31053b90ee0..f57c0e4c2326 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1567,7 +1567,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
1567 | goto csum_error; | 1567 | goto csum_error; |
1568 | 1568 | ||
1569 | 1569 | ||
1570 | if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) { | 1570 | if (sk_rcvqueues_full(sk, sk->sk_rcvbuf)) { |
1571 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, | 1571 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, |
1572 | is_udplite); | 1572 | is_udplite); |
1573 | goto drop; | 1573 | goto drop; |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index f9d8800bb72f..5b6091de5868 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -673,7 +673,7 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
673 | goto csum_error; | 673 | goto csum_error; |
674 | } | 674 | } |
675 | 675 | ||
676 | if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) { | 676 | if (sk_rcvqueues_full(sk, sk->sk_rcvbuf)) { |
677 | UDP6_INC_STATS_BH(sock_net(sk), | 677 | UDP6_INC_STATS_BH(sock_net(sk), |
678 | UDP_MIB_RCVBUFERRORS, is_udplite); | 678 | UDP_MIB_RCVBUFERRORS, is_udplite); |
679 | goto drop; | 679 | goto drop; |