diff options
author | Jianjun Kong <jianjun@zeuux.org> | 2008-11-02 00:38:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-02 00:38:31 -0400 |
commit | e27dfcea48372a4105d9fdf2e8450926737f6215 (patch) | |
tree | 2530f222be8dc52a3676afc552f19b6745e115bc /net/unix/garbage.c | |
parent | c37ccc0d4e2a4ee52f1a40cff1be0049f2104bba (diff) |
af_unix: clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c
clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c
Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r-- | net/unix/garbage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 2a27b84f740b..00734e22ec15 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c | |||
@@ -104,8 +104,8 @@ static struct sock *unix_get_socket(struct file *filp) | |||
104 | * Socket ? | 104 | * Socket ? |
105 | */ | 105 | */ |
106 | if (S_ISSOCK(inode->i_mode)) { | 106 | if (S_ISSOCK(inode->i_mode)) { |
107 | struct socket * sock = SOCKET_I(inode); | 107 | struct socket *sock = SOCKET_I(inode); |
108 | struct sock * s = sock->sk; | 108 | struct sock *s = sock->sk; |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * PF_UNIX ? | 111 | * PF_UNIX ? |
@@ -124,7 +124,7 @@ static struct sock *unix_get_socket(struct file *filp) | |||
124 | void unix_inflight(struct file *fp) | 124 | void unix_inflight(struct file *fp) |
125 | { | 125 | { |
126 | struct sock *s = unix_get_socket(fp); | 126 | struct sock *s = unix_get_socket(fp); |
127 | if(s) { | 127 | if (s) { |
128 | struct unix_sock *u = unix_sk(s); | 128 | struct unix_sock *u = unix_sk(s); |
129 | spin_lock(&unix_gc_lock); | 129 | spin_lock(&unix_gc_lock); |
130 | if (atomic_long_inc_return(&u->inflight) == 1) { | 130 | if (atomic_long_inc_return(&u->inflight) == 1) { |
@@ -141,7 +141,7 @@ void unix_inflight(struct file *fp) | |||
141 | void unix_notinflight(struct file *fp) | 141 | void unix_notinflight(struct file *fp) |
142 | { | 142 | { |
143 | struct sock *s = unix_get_socket(fp); | 143 | struct sock *s = unix_get_socket(fp); |
144 | if(s) { | 144 | if (s) { |
145 | struct unix_sock *u = unix_sk(s); | 145 | struct unix_sock *u = unix_sk(s); |
146 | spin_lock(&unix_gc_lock); | 146 | spin_lock(&unix_gc_lock); |
147 | BUG_ON(list_empty(&u->link)); | 147 | BUG_ON(list_empty(&u->link)); |
@@ -154,7 +154,7 @@ void unix_notinflight(struct file *fp) | |||
154 | 154 | ||
155 | static inline struct sk_buff *sock_queue_head(struct sock *sk) | 155 | static inline struct sk_buff *sock_queue_head(struct sock *sk) |
156 | { | 156 | { |
157 | return (struct sk_buff *) &sk->sk_receive_queue; | 157 | return (struct sk_buff *)&sk->sk_receive_queue; |
158 | } | 158 | } |
159 | 159 | ||
160 | #define receive_queue_for_each_skb(sk, next, skb) \ | 160 | #define receive_queue_for_each_skb(sk, next, skb) \ |
@@ -339,7 +339,7 @@ void unix_gc(void) | |||
339 | */ | 339 | */ |
340 | skb_queue_head_init(&hitlist); | 340 | skb_queue_head_init(&hitlist); |
341 | list_for_each_entry(u, &gc_candidates, link) | 341 | list_for_each_entry(u, &gc_candidates, link) |
342 | scan_children(&u->sk, inc_inflight, &hitlist); | 342 | scan_children(&u->sk, inc_inflight, &hitlist); |
343 | 343 | ||
344 | spin_unlock(&unix_gc_lock); | 344 | spin_unlock(&unix_gc_lock); |
345 | 345 | ||