patch-2.1.30 linux/net/unix/af_unix.c

Next file: linux/net/x25/af_x25.c
Previous file: linux/net/socket.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.29/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
@@ -115,17 +115,17 @@
 
 extern __inline__ void unix_lock(unix_socket *sk)
 {
-	sk->users++;
+	sk->sock_readers++;
 }
 
 extern __inline__ int unix_unlock(unix_socket *sk)
 {
-	return sk->users--;
+	return sk->sock_readers--;
 }
 
 extern __inline__ int unix_locked(unix_socket *sk)
 {
-	return sk->users;
+	return sk->sock_readers;
 }
 
 extern __inline__ void unix_release_addr(struct unix_address *addr)
@@ -348,7 +348,7 @@
 	
 	sk->protinfo.af_unix.family=AF_UNIX;
 	sk->protinfo.af_unix.inode=NULL;
-	sk->users=1;				/* Us */
+	sk->sock_readers=1;				/* Us */
 	sk->protinfo.af_unix.readsem=MUTEX;	/* single task reading lock */
 	sk->mtu=4096;
 	sk->protinfo.af_unix.list=&unix_sockets_unbound;
@@ -1303,6 +1303,8 @@
 {
 	struct sock *sk = sock->sk;
 	unix_socket *other=unix_peer(sk);
+	
+	mode++;
 
 	if (mode&SEND_SHUTDOWN)
 	{
@@ -1382,7 +1384,7 @@
 	{
 		len+=sprintf(buffer+len,"%p: %08X %08X %08lX %04X %02X %5ld",
 			s,
-			s->users,
+			s->sock_readers,
 			0,
 			s->socket ? s->socket->flags : 0,
 			s->type,

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]