Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59047
b: refs/heads/master
c: 1fd05ba
h: refs/heads/master
i:
  59045: 3dc9d0e
  59043: cc82854
  59039: 88f643a
v: v3
  • Loading branch information
Miklos Szeredi authored and David S. Miller committed Jul 11, 2007
1 parent b9bb10b commit cdac015
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 145 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99d24edeb6abc6ca3a0d0fbdb83c664c04403c8c
refs/heads/master: 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9
3 changes: 2 additions & 1 deletion trunk/include/net/af_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ struct unix_sock {
struct mutex readlock;
struct sock *peer;
struct sock *other;
struct sock *gc_tree;
struct list_head link;
atomic_t inflight;
spinlock_t lock;
unsigned int gc_candidate : 1;
wait_queue_head_t peer_wait;
};
#define unix_sk(__sk) ((struct unix_sock *)__sk)
Expand Down
6 changes: 2 additions & 4 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,8 @@ static struct sock * unix_create1(struct socket *sock)
u->dentry = NULL;
u->mnt = NULL;
spin_lock_init(&u->lock);
atomic_set(&u->inflight, sock ? 0 : -1);
atomic_set(&u->inflight, 0);
INIT_LIST_HEAD(&u->link);
mutex_init(&u->readlock); /* single task reading lock */
init_waitqueue_head(&u->peer_wait);
unix_insert_socket(unix_sockets_unbound, sk);
Expand Down Expand Up @@ -1134,9 +1135,6 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
/* take ten and and send info to listening sock */
spin_lock(&other->sk_receive_queue.lock);
__skb_queue_tail(&other->sk_receive_queue, skb);
/* Undo artificially decreased inflight after embrion
* is installed to listening socket. */
atomic_inc(&newu->inflight);
spin_unlock(&other->sk_receive_queue.lock);
unix_state_unlock(other);
other->sk_data_ready(other, 0);
Expand Down
Loading

0 comments on commit cdac015

Please sign in to comment.