mptcp: Fix build with PROC_FS disabled.
authorDavid S. Miller <davem@davemloft.net>
Wed, 29 Jan 2020 09:39:23 +0000 (10:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jan 2020 09:39:23 +0000 (10:39 +0100)
net/mptcp/subflow.c: In function ‘mptcp_subflow_create_socket’:
net/mptcp/subflow.c:624:25: error: ‘struct netns_core’ has no member named ‘sock_inuse’

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c

index 1662e117894900a8e4439475741fc83d1fb052eb..205dca1c30b78c1edf3d41753cd5622cee1e890c 100644 (file)
@@ -621,7 +621,9 @@ int mptcp_subflow_create_socket(struct sock *sk, struct socket **new_sock)
         */
        sf->sk->sk_net_refcnt = 1;
        get_net(net);
+#ifdef CONFIG_PROC_FS
        this_cpu_add(*net->core.sock_inuse, 1);
+#endif
        err = tcp_set_ulp(sf->sk, "mptcp");
        release_sock(sf->sk);