uml: fix inconsistence due to tty_operation change
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / raw.c
index d965f0a39c84e8562ee13958aea98023e8133e83..11d7f753a8206bb6b28335deaf1982a8f8cc1ef1 100644 (file)
@@ -93,7 +93,7 @@ void raw_hash_sk(struct sock *sk)
 
        write_lock_bh(&h->lock);
        sk_add_node(sk, head);
-       sock_prot_inuse_add(sk->sk_prot, 1);
+       sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
        write_unlock_bh(&h->lock);
 }
 EXPORT_SYMBOL_GPL(raw_hash_sk);
@@ -104,7 +104,7 @@ void raw_unhash_sk(struct sock *sk)
 
        write_lock_bh(&h->lock);
        if (sk_del_node_init(sk))
-               sock_prot_inuse_add(sk->sk_prot, -1);
+               sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
        write_unlock_bh(&h->lock);
 }
 EXPORT_SYMBOL_GPL(raw_unhash_sk);
@@ -818,8 +818,6 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg)
        }
 }
 
-DEFINE_PROTO_INUSE(raw)
-
 struct proto raw_prot = {
        .name              = "RAW",
        .owner             = THIS_MODULE,
@@ -842,7 +840,6 @@ struct proto raw_prot = {
        .compat_setsockopt = compat_raw_setsockopt,
        .compat_getsockopt = compat_raw_getsockopt,
 #endif
-       REF_PROTO_INUSE(raw)
 };
 
 #ifdef CONFIG_PROC_FS