patch-2.1.53 linux/net/netrom/af_netrom.c

Next file: linux/net/netsyms.c
Previous file: linux/net/netlink.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.52/linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
@@ -98,7 +98,7 @@
 	struct sock *sk;
 	nr_cb *nr;
 
-	if ((sk = sk_alloc(GFP_ATOMIC)) == NULL)
+	if ((sk = sk_alloc(AF_NETROM, GFP_ATOMIC)) == NULL)
 		return NULL;
 
 	if ((nr = kmalloc(sizeof(*nr), GFP_ATOMIC)) == NULL) {
@@ -526,16 +526,6 @@
 	return sk;
 }
 
-static int nr_dup(struct socket *newsock, struct socket *oldsock)
-{
-	struct sock *sk = oldsock->sk;
-
-	if (sk == NULL || newsock == NULL)
-		return -EINVAL;
-
-	return nr_create(newsock, sk->protocol);
-}
-
 static int nr_release(struct socket *sock, struct socket *peer)
 {
 	struct sock *sk = sock->sk;
@@ -728,11 +718,6 @@
 	return 0;
 }
 
-static int nr_socketpair(struct socket *sock1, struct socket *sock2)
-{
-	return -EOPNOTSUPP;
-}
-
 static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
 {
 	struct sock *sk;
@@ -1211,11 +1196,11 @@
 static struct proto_ops nr_proto_ops = {
 	AF_NETROM,
 
-	nr_dup,
+	sock_no_dup,
 	nr_release,
 	nr_bind,
 	nr_connect,
-	nr_socketpair,
+	sock_no_socketpair,
 	nr_accept,
 	nr_getname,
 	datagram_poll,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov