diff options
Diffstat (limited to 'net/atm/svc.c')
-rw-r--r-- | net/atm/svc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/atm/svc.c b/net/atm/svc.c index 66e1d9b3e5de..251ddbc42e4b 100644 --- a/net/atm/svc.c +++ b/net/atm/svc.c | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ | 3 | /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ |
4 | 4 | ||
5 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ | ||
5 | 6 | ||
6 | #include <linux/string.h> | 7 | #include <linux/string.h> |
7 | #include <linux/net.h> /* struct socket, struct proto_ops */ | 8 | #include <linux/net.h> /* struct socket, struct proto_ops */ |
@@ -46,7 +47,7 @@ static void svc_disconnect(struct atm_vcc *vcc) | |||
46 | struct sk_buff *skb; | 47 | struct sk_buff *skb; |
47 | struct sock *sk = sk_atm(vcc); | 48 | struct sock *sk = sk_atm(vcc); |
48 | 49 | ||
49 | pr_debug("svc_disconnect %p\n",vcc); | 50 | pr_debug("%p\n",vcc); |
50 | if (test_bit(ATM_VF_REGIS,&vcc->flags)) { | 51 | if (test_bit(ATM_VF_REGIS,&vcc->flags)) { |
51 | prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); | 52 | prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); |
52 | sigd_enq(vcc,as_close,NULL,NULL,NULL); | 53 | sigd_enq(vcc,as_close,NULL,NULL,NULL); |
@@ -76,7 +77,7 @@ static int svc_release(struct socket *sock) | |||
76 | 77 | ||
77 | if (sk) { | 78 | if (sk) { |
78 | vcc = ATM_SD(sock); | 79 | vcc = ATM_SD(sock); |
79 | pr_debug("svc_release %p\n", vcc); | 80 | pr_debug("%p\n", vcc); |
80 | clear_bit(ATM_VF_READY, &vcc->flags); | 81 | clear_bit(ATM_VF_READY, &vcc->flags); |
81 | /* VCC pointer is used as a reference, so we must not free it | 82 | /* VCC pointer is used as a reference, so we must not free it |
82 | (thereby subjecting it to re-use) before all pending connections | 83 | (thereby subjecting it to re-use) before all pending connections |
@@ -153,7 +154,7 @@ static int svc_connect(struct socket *sock,struct sockaddr *sockaddr, | |||
153 | struct atm_vcc *vcc = ATM_SD(sock); | 154 | struct atm_vcc *vcc = ATM_SD(sock); |
154 | int error; | 155 | int error; |
155 | 156 | ||
156 | pr_debug("svc_connect %p\n",vcc); | 157 | pr_debug("%p\n",vcc); |
157 | lock_sock(sk); | 158 | lock_sock(sk); |
158 | if (sockaddr_len != sizeof(struct sockaddr_atmsvc)) { | 159 | if (sockaddr_len != sizeof(struct sockaddr_atmsvc)) { |
159 | error = -EINVAL; | 160 | error = -EINVAL; |
@@ -286,7 +287,7 @@ static int svc_listen(struct socket *sock,int backlog) | |||
286 | struct atm_vcc *vcc = ATM_SD(sock); | 287 | struct atm_vcc *vcc = ATM_SD(sock); |
287 | int error; | 288 | int error; |
288 | 289 | ||
289 | pr_debug("svc_listen %p\n",vcc); | 290 | pr_debug("%p\n", vcc); |
290 | lock_sock(sk); | 291 | lock_sock(sk); |
291 | /* let server handle listen on unbound sockets */ | 292 | /* let server handle listen on unbound sockets */ |
292 | if (test_bit(ATM_VF_SESSION,&vcc->flags)) { | 293 | if (test_bit(ATM_VF_SESSION,&vcc->flags)) { |
@@ -336,7 +337,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags) | |||
336 | 337 | ||
337 | new_vcc = ATM_SD(newsock); | 338 | new_vcc = ATM_SD(newsock); |
338 | 339 | ||
339 | pr_debug("svc_accept %p -> %p\n",old_vcc,new_vcc); | 340 | pr_debug("%p -> %p\n", old_vcc, new_vcc); |
340 | while (1) { | 341 | while (1) { |
341 | DEFINE_WAIT(wait); | 342 | DEFINE_WAIT(wait); |
342 | 343 | ||
@@ -540,7 +541,7 @@ static int svc_addparty(struct socket *sock, struct sockaddr *sockaddr, | |||
540 | error = -EINPROGRESS; | 541 | error = -EINPROGRESS; |
541 | goto out; | 542 | goto out; |
542 | } | 543 | } |
543 | pr_debug("svc_addparty added wait queue\n"); | 544 | pr_debug("added wait queue\n"); |
544 | while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { | 545 | while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { |
545 | schedule(); | 546 | schedule(); |
546 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 547 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); |