From 9aecb71751b448c28ccca98d6543c5f992cbfb2e Mon Sep 17 00:00:00 2001 From: Benjamin LaHaise Date: Tue, 3 Jan 2006 14:10:46 -0800 Subject: [PATCH] --- yaml --- r: 15574 b: refs/heads/master c: fd19f329a32bdc4eb07885e0b3889567cfe00aa7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/af_unix.h | 10 +++++----- trunk/net/unix/af_unix.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 29e25cdb8abf..41fad47def01 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4947d3ef8de7b4f42aed6ea9ba689dc8fb45b5a5 +refs/heads/master: fd19f329a32bdc4eb07885e0b3889567cfe00aa7 diff --git a/trunk/include/net/af_unix.h b/trunk/include/net/af_unix.h index 3f302ae98c03..bfc1779fc753 100644 --- a/trunk/include/net/af_unix.h +++ b/trunk/include/net/af_unix.h @@ -58,10 +58,10 @@ struct unix_skb_parms { #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) -#define unix_state_rlock(s) read_lock(&unix_sk(s)->lock) -#define unix_state_runlock(s) read_unlock(&unix_sk(s)->lock) -#define unix_state_wlock(s) write_lock(&unix_sk(s)->lock) -#define unix_state_wunlock(s) write_unlock(&unix_sk(s)->lock) +#define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) +#define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) +#define unix_state_wlock(s) spin_lock(&unix_sk(s)->lock) +#define unix_state_wunlock(s) spin_unlock(&unix_sk(s)->lock) #ifdef __KERNEL__ /* The AF_UNIX socket */ @@ -76,7 +76,7 @@ struct unix_sock { struct sock *other; struct sock *gc_tree; atomic_t inflight; - rwlock_t lock; + spinlock_t lock; wait_queue_head_t peer_wait; }; #define unix_sk(__sk) ((struct unix_sock *)__sk) diff --git a/trunk/net/unix/af_unix.c b/trunk/net/unix/af_unix.c index 7d3fe6aebcdb..1ddd36d50091 100644 --- a/trunk/net/unix/af_unix.c +++ b/trunk/net/unix/af_unix.c @@ -564,7 +564,7 @@ static struct sock * unix_create1(struct socket *sock) u = unix_sk(sk); u->dentry = NULL; u->mnt = NULL; - rwlock_init(&u->lock); + spin_lock_init(&u->lock); atomic_set(&u->inflight, sock ? 0 : -1); init_MUTEX(&u->readsem); /* single task reading lock */ init_waitqueue_head(&u->peer_wait);