diff options
Diffstat (limited to 'net/atm/common.c')
-rw-r--r-- | net/atm/common.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/atm/common.c b/net/atm/common.c index d34edbe754c8..8c4d843eb17f 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -62,15 +62,15 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size) | |||
62 | struct sk_buff *skb; | 62 | struct sk_buff *skb; |
63 | struct sock *sk = sk_atm(vcc); | 63 | struct sock *sk = sk_atm(vcc); |
64 | 64 | ||
65 | if (atomic_read(&sk->sk_wmem_alloc) && !atm_may_send(vcc, size)) { | 65 | if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) { |
66 | pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", | 66 | pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", |
67 | atomic_read(&sk->sk_wmem_alloc), size, | 67 | sk_wmem_alloc_get(sk), size, |
68 | sk->sk_sndbuf); | 68 | sk->sk_sndbuf); |
69 | return NULL; | 69 | return NULL; |
70 | } | 70 | } |
71 | while (!(skb = alloc_skb(size,GFP_KERNEL))) schedule(); | 71 | while (!(skb = alloc_skb(size, GFP_KERNEL))) |
72 | pr_debug("AlTx %d += %d\n", atomic_read(&sk->sk_wmem_alloc), | 72 | schedule(); |
73 | skb->truesize); | 73 | pr_debug("AlTx %d += %d\n", sk_wmem_alloc_get(sk), skb->truesize); |
74 | atomic_add(skb->truesize, &sk->sk_wmem_alloc); | 74 | atomic_add(skb->truesize, &sk->sk_wmem_alloc); |
75 | return skb; | 75 | return skb; |
76 | } | 76 | } |
@@ -92,7 +92,7 @@ static void vcc_sock_destruct(struct sock *sk) | |||
92 | static void vcc_def_wakeup(struct sock *sk) | 92 | static void vcc_def_wakeup(struct sock *sk) |
93 | { | 93 | { |
94 | read_lock(&sk->sk_callback_lock); | 94 | read_lock(&sk->sk_callback_lock); |
95 | if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) | 95 | if (sk_has_sleeper(sk)) |
96 | wake_up(sk->sk_sleep); | 96 | wake_up(sk->sk_sleep); |
97 | read_unlock(&sk->sk_callback_lock); | 97 | read_unlock(&sk->sk_callback_lock); |
98 | } | 98 | } |
@@ -110,7 +110,7 @@ static void vcc_write_space(struct sock *sk) | |||
110 | read_lock(&sk->sk_callback_lock); | 110 | read_lock(&sk->sk_callback_lock); |
111 | 111 | ||
112 | if (vcc_writable(sk)) { | 112 | if (vcc_writable(sk)) { |
113 | if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) | 113 | if (sk_has_sleeper(sk)) |
114 | wake_up_interruptible(sk->sk_sleep); | 114 | wake_up_interruptible(sk->sk_sleep); |
115 | 115 | ||
116 | sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); | 116 | sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); |
@@ -145,7 +145,7 @@ int vcc_create(struct net *net, struct socket *sock, int protocol, int family) | |||
145 | memset(&vcc->local,0,sizeof(struct sockaddr_atmsvc)); | 145 | memset(&vcc->local,0,sizeof(struct sockaddr_atmsvc)); |
146 | memset(&vcc->remote,0,sizeof(struct sockaddr_atmsvc)); | 146 | memset(&vcc->remote,0,sizeof(struct sockaddr_atmsvc)); |
147 | vcc->qos.txtp.max_sdu = 1 << 16; /* for meta VCs */ | 147 | vcc->qos.txtp.max_sdu = 1 << 16; /* for meta VCs */ |
148 | atomic_set(&sk->sk_wmem_alloc, 0); | 148 | atomic_set(&sk->sk_wmem_alloc, 1); |
149 | atomic_set(&sk->sk_rmem_alloc, 0); | 149 | atomic_set(&sk->sk_rmem_alloc, 0); |
150 | vcc->push = NULL; | 150 | vcc->push = NULL; |
151 | vcc->pop = NULL; | 151 | vcc->pop = NULL; |
@@ -594,7 +594,7 @@ unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait) | |||
594 | struct atm_vcc *vcc; | 594 | struct atm_vcc *vcc; |
595 | unsigned int mask; | 595 | unsigned int mask; |
596 | 596 | ||
597 | poll_wait(file, sk->sk_sleep, wait); | 597 | sock_poll_wait(file, sk->sk_sleep, wait); |
598 | mask = 0; | 598 | mask = 0; |
599 | 599 | ||
600 | vcc = ATM_SD(sock); | 600 | vcc = ATM_SD(sock); |