]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/af_bluetooth.c
[SOCK][NETNS]: Add a struct net argument to sock_prot_inuse_add and _get.
[linux-2.6-omap-h63xx.git] / net / bluetooth / af_bluetooth.c
index d942b946ba07efb959686d968677a2ad0faf00ef..1220d8a41eb5ff52d6726250238c975f4cef4e8a 100644 (file)
@@ -95,10 +95,13 @@ int bt_sock_unregister(int proto)
 }
 EXPORT_SYMBOL(bt_sock_unregister);
 
-static int bt_sock_create(struct socket *sock, int proto)
+static int bt_sock_create(struct net *net, struct socket *sock, int proto)
 {
        int err;
 
+       if (net != &init_net)
+               return -EAFNOSUPPORT;
+
        if (proto < 0 || proto >= BT_MAX_PROTO)
                return -EINVAL;
 
@@ -113,7 +116,7 @@ static int bt_sock_create(struct socket *sock, int proto)
        read_lock(&bt_proto_lock);
 
        if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) {
-               err = bt_proto[proto]->create(sock, proto);
+               err = bt_proto[proto]->create(net, sock, proto);
                module_put(bt_proto[proto]->owner);
        }