net: Pass kern from net_proto_family.create to sk_alloc
[linux-2.6-block.git] / net / vmw_vsock / af_vsock.c
index 2ec86e652a19802ec7f81e7443d29bbdf468b174..df5fc6b340f1bbde621fbe84fa44e0af6e2e00af 100644 (file)
@@ -581,13 +581,14 @@ struct sock *__vsock_create(struct net *net,
                            struct socket *sock,
                            struct sock *parent,
                            gfp_t priority,
-                           unsigned short type)
+                           unsigned short type,
+                           int kern)
 {
        struct sock *sk;
        struct vsock_sock *psk;
        struct vsock_sock *vsk;
 
-       sk = sk_alloc(net, AF_VSOCK, priority, &vsock_proto);
+       sk = sk_alloc(net, AF_VSOCK, priority, &vsock_proto, kern);
        if (!sk)
                return NULL;
 
@@ -1866,7 +1867,7 @@ static int vsock_create(struct net *net, struct socket *sock,
 
        sock->state = SS_UNCONNECTED;
 
-       return __vsock_create(net, sock, NULL, GFP_KERNEL, 0) ? 0 : -ENOMEM;
+       return __vsock_create(net, sock, NULL, GFP_KERNEL, 0, kern) ? 0 : -ENOMEM;
 }
 
 static const struct net_proto_family vsock_family_ops = {