aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 783317dacd30..015606b54d9b 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -8,8 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 * 10 *
11 * Version: $Id: af_unix.c,v 1.133 2002/02/08 03:57:19 davem Exp $
12 *
13 * Fixes: 11 * Fixes:
14 * Linus Torvalds : Assorted bug cures. 12 * Linus Torvalds : Assorted bug cures.
15 * Niibe Yutaka : async I/O support. 13 * Niibe Yutaka : async I/O support.
@@ -229,7 +227,7 @@ static void __unix_remove_socket(struct sock *sk)
229 227
230static void __unix_insert_socket(struct hlist_head *list, struct sock *sk) 228static void __unix_insert_socket(struct hlist_head *list, struct sock *sk)
231{ 229{
232 BUG_TRAP(sk_unhashed(sk)); 230 WARN_ON(!sk_unhashed(sk));
233 sk_add_node(sk, list); 231 sk_add_node(sk, list);
234} 232}
235 233
@@ -352,9 +350,9 @@ static void unix_sock_destructor(struct sock *sk)
352 350
353 skb_queue_purge(&sk->sk_receive_queue); 351 skb_queue_purge(&sk->sk_receive_queue);
354 352
355 BUG_TRAP(!atomic_read(&sk->sk_wmem_alloc)); 353 WARN_ON(atomic_read(&sk->sk_wmem_alloc));
356 BUG_TRAP(sk_unhashed(sk)); 354 WARN_ON(!sk_unhashed(sk));
357 BUG_TRAP(!sk->sk_socket); 355 WARN_ON(sk->sk_socket);
358 if (!sock_flag(sk, SOCK_DEAD)) { 356 if (!sock_flag(sk, SOCK_DEAD)) {
359 printk("Attempt to release alive unix socket: %p\n", sk); 357 printk("Attempt to release alive unix socket: %p\n", sk);
360 return; 358 return;
@@ -605,7 +603,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
605 u->dentry = NULL; 603 u->dentry = NULL;
606 u->mnt = NULL; 604 u->mnt = NULL;
607 spin_lock_init(&u->lock); 605 spin_lock_init(&u->lock);
608 atomic_set(&u->inflight, 0); 606 atomic_long_set(&u->inflight, 0);
609 INIT_LIST_HEAD(&u->link); 607 INIT_LIST_HEAD(&u->link);
610 mutex_init(&u->readlock); /* single task reading lock */ 608 mutex_init(&u->readlock); /* single task reading lock */
611 init_waitqueue_head(&u->peer_wait); 609 init_waitqueue_head(&u->peer_wait);