]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
udp: get rid of sk_prot_clear_portaddr_nulls()
authorEric Dumazet <edumazet@google.com>
Tue, 23 Aug 2016 18:39:27 +0000 (11:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2016 06:25:29 +0000 (23:25 -0700)
Since we no longer use SLAB_DESTROY_BY_RCU for UDP,
we do not need sk_prot_clear_portaddr_nulls() helper.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c
net/ipv4/udp.c
net/ipv4/udplite.c
net/ipv6/udplite.c

index 2aab9b63bf168dd77e8eee854c54e3dee9149615..1bc57609f8e193100b576bc8f91508d603733267 100644 (file)
@@ -1242,8 +1242,6 @@ static inline int __sk_prot_rehash(struct sock *sk)
        return sk->sk_prot->hash(sk);
 }
 
-void sk_prot_clear_portaddr_nulls(struct sock *sk, int size);
-
 /* About 10 seconds */
 #define SOCK_DESTROY_TIME (10*HZ)
 
index 25dab8b60223e25ee92dae45a226fce2a6bb5a03..2b09c2967e212658ce4753e41f8ba8c4f0988b0e 100644 (file)
@@ -1315,24 +1315,6 @@ static void sock_copy(struct sock *nsk, const struct sock *osk)
 #endif
 }
 
-void sk_prot_clear_portaddr_nulls(struct sock *sk, int size)
-{
-       unsigned long nulls1, nulls2;
-
-       nulls1 = offsetof(struct sock, __sk_common.skc_node.next);
-       nulls2 = offsetof(struct sock, __sk_common.skc_portaddr_node.next);
-       if (nulls1 > nulls2)
-               swap(nulls1, nulls2);
-
-       if (nulls1 != 0)
-               memset((char *)sk, 0, nulls1);
-       memset((char *)sk + nulls1 + sizeof(void *), 0,
-              nulls2 - nulls1 - sizeof(void *));
-       memset((char *)sk + nulls2 + sizeof(void *), 0,
-              size - nulls2 - sizeof(void *));
-}
-EXPORT_SYMBOL(sk_prot_clear_portaddr_nulls);
-
 static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
                int family)
 {
index e9ffc27b23d0e739deb39bbadc56a5f5f4083bbc..f0ebb0bd1e11afc344445458b22c58cd8cb5b8f8 100644 (file)
@@ -2237,7 +2237,6 @@ struct proto udp_prot = {
        .compat_setsockopt = compat_udp_setsockopt,
        .compat_getsockopt = compat_udp_getsockopt,
 #endif
-       .clear_sk          = sk_prot_clear_portaddr_nulls,
        .diag_destroy      = udp_abort,
 };
 EXPORT_SYMBOL(udp_prot);
index 3b3efbda48e13941b35388238508706844c043aa..67fc9d96e67dae76af5d9abe6ee2c7baad08bbe4 100644 (file)
@@ -61,7 +61,6 @@ struct proto  udplite_prot = {
        .compat_setsockopt = compat_udp_setsockopt,
        .compat_getsockopt = compat_udp_getsockopt,
 #endif
-       .clear_sk          = sk_prot_clear_portaddr_nulls,
 };
 EXPORT_SYMBOL(udplite_prot);
 
index 118057a5b7592fefdea37008099a2cc033507ca1..5cf0099b86f71c2f74f813b17230f80149665b8e 100644 (file)
@@ -56,7 +56,6 @@ struct proto udplitev6_prot = {
        .compat_setsockopt = compat_udpv6_setsockopt,
        .compat_getsockopt = compat_udpv6_getsockopt,
 #endif
-       .clear_sk          = sk_prot_clear_portaddr_nulls,
 };
 
 static struct inet_protosw udplite6_protosw = {