patch-2.1.34 linux/net/x25/af_x25.c
Next file: linux/net/x25/x25_timer.c
Previous file: linux/net/unix/af_unix.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Mon Apr 14 09:31:10 1997
- Orig file:
v2.1.33/linux/net/x25/af_x25.c
- Orig date:
Mon Apr 7 11:35:33 1997
diff -u --recursive --new-file v2.1.33/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -328,7 +328,8 @@
kfree_skb(skb, FREE_READ);
}
- if (sk->wmem_alloc != 0 || sk->rmem_alloc != 0) { /* Defer: outstanding buffers */
+ if (atomic_read(&sk->wmem_alloc) != 0 || atomic_read(&sk->rmem_alloc) != 0) {
+ /* Defer: outstanding buffers */
init_timer(&sk->timer);
sk->timer.expires = jiffies + 10 * HZ;
sk->timer.function = x25_destroy_timer;
@@ -1057,7 +1058,7 @@
case TIOCOUTQ:
if ((err = verify_area(VERIFY_WRITE, (void *)arg, sizeof(unsigned long))) != 0)
return err;
- amount = sk->sndbuf - sk->wmem_alloc;
+ amount = sk->sndbuf - atomic_read(&sk->wmem_alloc);
if (amount < 0)
amount = 0;
put_user(amount, (unsigned long *)arg);
@@ -1198,7 +1199,7 @@
s->protinfo.x25->t21 / X25_SLOWHZ,
s->protinfo.x25->t22 / X25_SLOWHZ,
s->protinfo.x25->t23 / X25_SLOWHZ,
- s->wmem_alloc, s->rmem_alloc);
+ atomic_read(&s->wmem_alloc), atomic_read(&s->rmem_alloc));
pos = begin + len;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov