patch-2.3.15 linux/net/x25/af_x25.c

Next file: linux/net/x25/x25_dev.c
Previous file: linux/net/unix/sysctl_net_unix.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.14/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -522,7 +522,7 @@
 	return sk;
 }
 
-static int x25_release(struct socket *sock, struct socket *peer)
+static int x25_release(struct socket *sock)
 {
 	struct sock *sk = sock->sk;
 
@@ -680,11 +680,6 @@
 	struct sock *newsk;
 	struct sk_buff *skb;
 
-	if (newsock->sk != NULL)
-		x25_destroy_socket(newsock->sk);
-
-	newsock->sk = NULL;
-
 	if ((sk = sock->sk) == NULL)
 		return -EINVAL;
 
@@ -1239,10 +1234,9 @@
 	x25_create
 };
 
-static struct proto_ops x25_proto_ops = {
+static struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
 	AF_X25,
 
-	sock_no_dup,
 	x25_release,
 	x25_bind,
 	x25_connect,
@@ -1257,8 +1251,13 @@
 	x25_getsockopt,
 	sock_no_fcntl,
 	x25_sendmsg,
-	x25_recvmsg
+	x25_recvmsg,
+	sock_no_mmap
 };
+
+#include <linux/smp_lock.h>
+SOCKOPS_WRAP(x25_proto, AF_X25);
+
 
 static struct packet_type x25_packet_type =
 {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)