diff options
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index d70fa30d4294..65ebccc0a698 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -592,7 +592,8 @@ static struct sock * unix_create1(struct socket *sock) | |||
592 | u->dentry = NULL; | 592 | u->dentry = NULL; |
593 | u->mnt = NULL; | 593 | u->mnt = NULL; |
594 | spin_lock_init(&u->lock); | 594 | spin_lock_init(&u->lock); |
595 | atomic_set(&u->inflight, sock ? 0 : -1); | 595 | atomic_set(&u->inflight, 0); |
596 | INIT_LIST_HEAD(&u->link); | ||
596 | mutex_init(&u->readlock); /* single task reading lock */ | 597 | mutex_init(&u->readlock); /* single task reading lock */ |
597 | init_waitqueue_head(&u->peer_wait); | 598 | init_waitqueue_head(&u->peer_wait); |
598 | unix_insert_socket(unix_sockets_unbound, sk); | 599 | unix_insert_socket(unix_sockets_unbound, sk); |
@@ -1134,9 +1135,6 @@ restart: | |||
1134 | /* take ten and and send info to listening sock */ | 1135 | /* take ten and and send info to listening sock */ |
1135 | spin_lock(&other->sk_receive_queue.lock); | 1136 | spin_lock(&other->sk_receive_queue.lock); |
1136 | __skb_queue_tail(&other->sk_receive_queue, skb); | 1137 | __skb_queue_tail(&other->sk_receive_queue, skb); |
1137 | /* Undo artificially decreased inflight after embrion | ||
1138 | * is installed to listening socket. */ | ||
1139 | atomic_inc(&newu->inflight); | ||
1140 | spin_unlock(&other->sk_receive_queue.lock); | 1138 | spin_unlock(&other->sk_receive_queue.lock); |
1141 | unix_state_unlock(other); | 1139 | unix_state_unlock(other); |
1142 | other->sk_data_ready(other, 0); | 1140 | other->sk_data_ready(other, 0); |
@@ -2048,7 +2046,7 @@ static int unix_seq_show(struct seq_file *seq, void *v) | |||
2048 | return 0; | 2046 | return 0; |
2049 | } | 2047 | } |
2050 | 2048 | ||
2051 | static struct seq_operations unix_seq_ops = { | 2049 | static const struct seq_operations unix_seq_ops = { |
2052 | .start = unix_seq_start, | 2050 | .start = unix_seq_start, |
2053 | .next = unix_seq_next, | 2051 | .next = unix_seq_next, |
2054 | .stop = unix_seq_stop, | 2052 | .stop = unix_seq_stop, |