git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
unix
/
garbage.c
diff --git
a/net/unix/garbage.c
b/net/unix/garbage.c
index
4bd95c8
..
f14ad66
100644
(file)
--- a/
net/unix/garbage.c
+++ b/
net/unix/garbage.c
@@
-76,11
+76,12
@@
#include <linux/netdevice.h>
#include <linux/file.h>
#include <linux/proc_fs.h>
#include <linux/netdevice.h>
#include <linux/file.h>
#include <linux/proc_fs.h>
-#include <linux/
tcp
.h>
+#include <linux/
mutex
.h>
#include <net/sock.h>
#include <net/af_unix.h>
#include <net/scm.h>
#include <net/sock.h>
#include <net/af_unix.h>
#include <net/scm.h>
+#include <net/tcp_states.h>
/* Internal data structures and random procedures: */
/* Internal data structures and random procedures: */
@@
-95,7
+96,7
@@
atomic_t unix_tot_inflight = ATOMIC_INIT(0);
static struct sock *unix_get_socket(struct file *filp)
{
struct sock *u_sock = NULL;
static struct sock *unix_get_socket(struct file *filp)
{
struct sock *u_sock = NULL;
- struct inode *inode = filp->f_dentry->d_inode;
+ struct inode *inode = filp->f_
path.
dentry->d_inode;
/*
* Socket ?
/*
* Socket ?
@@
-169,7
+170,7
@@
static void maybe_unmark_and_push(struct sock *x)
void unix_gc(void)
{
void unix_gc(void)
{
- static DE
CLAR
E_MUTEX(unix_gc_sem);
+ static DE
FIN
E_MUTEX(unix_gc_sem);
int i;
struct sock *s;
struct sk_buff_head hitlist;
int i;
struct sock *s;
struct sk_buff_head hitlist;
@@
-179,10
+180,10
@@
void unix_gc(void)
* Avoid a recursive GC.
*/
* Avoid a recursive GC.
*/
- if (
down
_trylock(&unix_gc_sem))
+ if (
!mutex
_trylock(&unix_gc_sem))
return;
return;
-
read
_lock(&unix_table_lock);
+
spin
_lock(&unix_table_lock);
forall_unix_sockets(i, s)
{
forall_unix_sockets(i, s)
{
@@
-286,27
+287,27
@@
void unix_gc(void)
skb = skb_peek(&s->sk_receive_queue);
while (skb &&
skb != (struct sk_buff *)&s->sk_receive_queue) {
skb = skb_peek(&s->sk_receive_queue);
while (skb &&
skb != (struct sk_buff *)&s->sk_receive_queue) {
- nextsk
=
skb->next;
+ nextsk
=
skb->next;
/*
* Do we have file descriptors ?
*/
/*
* Do we have file descriptors ?
*/
- if
(UNIXCB(skb).fp)
- {
-
__skb_unlink(skb, skb->list
);
- __skb_queue_tail(&hitlist,skb);
+ if
(UNIXCB(skb).fp) {
+ __skb_unlink(skb,
+
&s->sk_receive_queue
);
+ __skb_queue_tail(&hitlist,
skb);
}
}
- skb
=
nextsk;
+ skb
=
nextsk;
}
spin_unlock(&s->sk_receive_queue.lock);
}
u->gc_tree = GC_ORPHAN;
}
}
spin_unlock(&s->sk_receive_queue.lock);
}
u->gc_tree = GC_ORPHAN;
}
-
read
_unlock(&unix_table_lock);
+
spin
_unlock(&unix_table_lock);
/*
* Here we are. Hitlist is filled. Die.
*/
__skb_queue_purge(&hitlist);
/*
* Here we are. Hitlist is filled. Die.
*/
__skb_queue_purge(&hitlist);
-
up
(&unix_gc_sem);
+
mutex_unlock
(&unix_gc_sem);
}
}