patch-2.0.11 linux/net/core/sock.c
Next file: linux/net/ethernet/eth.c
Previous file: linux/net/core/dev.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Sun Aug 4 13:06:57 1996
- Orig file:
v2.0.10/linux/net/core/sock.c
- Orig date:
Wed Jun 26 11:05:26 1996
diff -u --recursive --new-file v2.0.10/linux/net/core/sock.c linux/net/core/sock.c
@@ -348,7 +348,7 @@
struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, int priority)
{
if (sk) {
- if (force || sk->wmem_alloc + size < sk->sndbuf) {
+ if (force || sk->wmem_alloc < sk->sndbuf) {
struct sk_buff * skb = alloc_skb(size, priority);
if (skb)
atomic_add(skb->truesize, &sk->wmem_alloc);
@@ -362,7 +362,7 @@
struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, int priority)
{
if (sk) {
- if (force || sk->rmem_alloc + size < sk->rcvbuf) {
+ if (force || sk->rmem_alloc < sk->rcvbuf) {
struct sk_buff *skb = alloc_skb(size, priority);
if (skb)
atomic_add(skb->truesize, &sk->rmem_alloc);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov