Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73547
b: refs/heads/master
c: 5c80f1a
h: refs/heads/master
i:
  73545: 9190f71
  73543: ba4083f
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Nov 11, 2007
1 parent 6147127 commit dc3ea7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 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: 9305cfa4443dbfb99faf35c5603ec0c0e91b5ef8
refs/heads/master: 5c80f1ae9842a8b7985acd0f02efb9828effb05f
20 changes: 9 additions & 11 deletions trunk/net/unix/garbage.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static inline struct sk_buff *sock_queue_head(struct sock *sk)
for (skb = sock_queue_head(sk)->next, next = skb->next; \
skb != sock_queue_head(sk); skb = next, next = skb->next)

static void scan_inflight(struct sock *x, void (*func)(struct sock *),
static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
struct sk_buff_head *hitlist)
{
struct sk_buff *skb;
Expand All @@ -185,9 +185,9 @@ static void scan_inflight(struct sock *x, void (*func)(struct sock *),
* if it indeed does so
*/
struct sock *sk = unix_get_socket(*fp++);
if(sk) {
if (sk) {
hit = true;
func(sk);
func(unix_sk(sk));
}
}
if (hit && hitlist != NULL) {
Expand All @@ -199,7 +199,7 @@ static void scan_inflight(struct sock *x, void (*func)(struct sock *),
spin_unlock(&x->sk_receive_queue.lock);
}

static void scan_children(struct sock *x, void (*func)(struct sock *),
static void scan_children(struct sock *x, void (*func)(struct unix_sock *),
struct sk_buff_head *hitlist)
{
if (x->sk_state != TCP_LISTEN)
Expand Down Expand Up @@ -235,20 +235,18 @@ static void scan_children(struct sock *x, void (*func)(struct sock *),
}
}

static void dec_inflight(struct sock *sk)
static void dec_inflight(struct unix_sock *usk)
{
atomic_dec(&unix_sk(sk)->inflight);
atomic_dec(&usk->inflight);
}

static void inc_inflight(struct sock *sk)
static void inc_inflight(struct unix_sock *usk)
{
atomic_inc(&unix_sk(sk)->inflight);
atomic_inc(&usk->inflight);
}

static void inc_inflight_move_tail(struct sock *sk)
static void inc_inflight_move_tail(struct unix_sock *u)
{
struct unix_sock *u = unix_sk(sk);

atomic_inc(&u->inflight);
/*
* If this is still a candidate, move it to the end of the
Expand Down

0 comments on commit dc3ea7b

Please sign in to comment.