summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/af_unix.h7
-rw-r--r--include/net/sock.h2
-rw-r--r--net/ax25/af_ax25.c1
-rw-r--r--net/ax25/ax25_in.c1
-rw-r--r--net/llc/af_llc.c1
-rw-r--r--net/netrom/af_netrom.c2
-rw-r--r--net/rose/af_rose.c2
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/wanrouter/af_wanpipe.c1
-rw-r--r--net/x25/af_x25.c2
10 files changed, 4 insertions, 17 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index be877d75cfeb..b60b3846b9d1 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -37,16 +37,14 @@ static inline struct sock *next_unix_socket(int *i, struct sock *s)
#define forall_unix_sockets(i, s) \
for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s)))
-struct unix_address
-{
+struct unix_address {
atomic_t refcnt;
int len;
unsigned hash;
struct sockaddr_un name[0];
};
-struct unix_skb_parms
-{
+struct unix_skb_parms {
struct ucred creds; /* Skb credentials */
struct scm_fp_list *fp; /* Passed files */
};
@@ -68,6 +66,7 @@ struct unix_sock {
struct dentry *dentry;
struct vfsmount *mnt;
struct semaphore readsem;
+ struct sock *peer;
struct sock *other;
struct sock *gc_tree;
atomic_t inflight;
diff --git a/include/net/sock.h b/include/net/sock.h
index e47031cf0a51..0666e2edd3c7 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -142,7 +142,6 @@ struct sock_common {
* @sk_route_caps - route capabilities (e.g. %NETIF_F_TSO)
* @sk_lingertime - %SO_LINGER l_linger setting
* @sk_hashent - hash entry in several tables (e.g. tcp_ehash)
- * @sk_pair - socket pair (e.g. AF_UNIX/unix_peer)
* @sk_backlog - always used with the per-socket spinlock held
* @sk_callback_lock - used with the callbacks in the end of this struct
* @sk_error_queue - rarely used
@@ -219,7 +218,6 @@ struct sock {
int sk_route_caps;
unsigned long sk_lingertime;
int sk_hashent;
- struct sock *sk_pair;
/*
* The backlog queue is special, it is always used with
* the per-socket spinlock held and requires low latency
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 3a84182f4474..2ff9b6f5ca35 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1338,7 +1338,6 @@ static int ax25_accept(struct socket *sock, struct socket *newsock, int flags)
remove_wait_queue(sk->sk_sleep, &wait);
newsk = skb->sk;
- newsk->sk_pair = NULL;
newsk->sk_socket = newsock;
newsk->sk_sleep = &newsock->wait;
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c
index e7f9e67938cc..01a2c865a36a 100644
--- a/net/ax25/ax25_in.c
+++ b/net/ax25/ax25_in.c
@@ -372,7 +372,6 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
skb_queue_head(&sk->sk_receive_queue, skb);
make->sk_state = TCP_ESTABLISHED;
- make->sk_pair = sk;
sk->sk_ack_backlog++;
bh_unlock_sock(sk);
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index d088fe8f6a79..357a1f0455a0 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -638,7 +638,6 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
newsk = skb->sk;
/* attach connection to a new socket. */
llc_ui_sk_init(newsock, newsk);
- newsk->sk_pair = NULL;
newsk->sk_zapped = 0;
newsk->sk_state = TCP_ESTABLISHED;
newsock->state = SS_CONNECTED;
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 6774669bb212..62ff798bf306 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -801,7 +801,6 @@ static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
remove_wait_queue(sk->sk_sleep, &wait);
newsk = skb->sk;
- newsk->sk_pair = NULL;
newsk->sk_socket = newsock;
newsk->sk_sleep = &newsock->wait;
@@ -994,7 +993,6 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
nr_make->vl = 0;
nr_make->state = NR_STATE_3;
sk->sk_ack_backlog++;
- make->sk_pair = sk;
nr_insert_socket(make);
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 31c4ab77efe7..4f6a9fab4e54 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -882,7 +882,6 @@ static int rose_accept(struct socket *sock, struct socket *newsock, int flags)
remove_wait_queue(sk->sk_sleep, &wait);
newsk = skb->sk;
- newsk->sk_pair = NULL;
newsk->sk_socket = newsock;
newsk->sk_sleep = &newsock->wait;
@@ -996,7 +995,6 @@ int rose_rx_call_request(struct sk_buff *skb, struct net_device *dev, struct ros
make_rose->vr = 0;
make_rose->vl = 0;
sk->sk_ack_backlog++;
- make->sk_pair = sk;
rose_insert_socket(make);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index c266bd6fa67a..b08297416cf8 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -144,7 +144,7 @@ static inline unsigned unix_hash_fold(unsigned hash)
return hash&(UNIX_HASH_SIZE-1);
}
-#define unix_peer(sk) ((sk)->sk_pair)
+#define unix_peer(sk) (unix_sk(sk)->peer)
static inline int unix_our_peer(struct sock *sk, struct sock *osk)
{
diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c
index 4776ec1eaa86..5acdc5a51650 100644
--- a/net/wanrouter/af_wanpipe.c
+++ b/net/wanrouter/af_wanpipe.c
@@ -2423,7 +2423,6 @@ static int wanpipe_accept(struct socket *sock, struct socket *newsock, int flags
write_unlock(&wanpipe_sklist_lock);
clear_bit(1,&wanpipe_tx_critical);
- newsk->sk_pair = NULL;
newsk->sk_socket = newsock;
newsk->sk_sleep = &newsock->wait;
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 17d20343aa85..be33fd881a74 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -769,7 +769,6 @@ static int x25_accept(struct socket *sock, struct socket *newsock, int flags)
if (!skb->sk)
goto out2;
newsk = skb->sk;
- newsk->sk_pair = NULL;
newsk->sk_socket = newsock;
newsk->sk_sleep = &newsock->wait;
@@ -887,7 +886,6 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
makex25->state = X25_STATE_3;
sk->sk_ack_backlog++;
- make->sk_pair = sk;
x25_insert_socket(make);