patch-2.1.53 linux/net/rose/af_rose.c

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

diff -u --recursive --new-file v2.1.52/linux/net/rose/af_rose.c linux/net/rose/af_rose.c
@@ -149,7 +149,7 @@
 	struct sock *sk;
 	rose_cb *rose;
 
-	if ((sk = sk_alloc(GFP_ATOMIC)) == NULL)
+	if ((sk = sk_alloc(AF_ROSE, GFP_ATOMIC)) == NULL)
 		return NULL;
 
 	if ((rose = kmalloc(sizeof(*rose), GFP_ATOMIC)) == NULL) {
@@ -613,16 +613,6 @@
 	return sk;
 }
 
-static int rose_dup(struct socket *newsock, struct socket *oldsock)
-{
-	struct sock *sk = oldsock->sk;
-
-	if (sk == NULL || newsock == NULL)
-		return -EINVAL;
-
-	return rose_create(newsock, sk->protocol);
-}
-
 static int rose_release(struct socket *sock, struct socket *peer)
 {
 	struct sock *sk = sock->sk;
@@ -816,11 +806,6 @@
 	return 0;
 }
 
-static int rose_socketpair(struct socket *sock1, struct socket *sock2)
-{
-	return -EOPNOTSUPP;
-}
-
 static int rose_accept(struct socket *sock, struct socket *newsock, int flags)
 {
 	struct sock *sk;
@@ -1332,11 +1317,11 @@
 static struct proto_ops rose_proto_ops = {
 	AF_ROSE,
 
-	rose_dup,
+	sock_no_dup,
 	rose_release,
 	rose_bind,
 	rose_connect,
-	rose_socketpair,
+	sock_no_socketpair,
 	rose_accept,
 	rose_getname,
 	datagram_poll,

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