aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-08-23 14:39:27 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-24 02:25:29 -0400
commit4cac8204661a6d1a842e47911933f1e90b392c84 (patch)
tree5f74a9110f1af36e2897fc09236acb8c8a1225ce
parent6a6ad2a4e57bc907a6977eef6cad49348ad2744b (diff)
udp: get rid of sk_prot_clear_portaddr_nulls()
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>
-rw-r--r--include/net/sock.h2
-rw-r--r--net/core/sock.c18
-rw-r--r--net/ipv4/udp.c1
-rw-r--r--net/ipv4/udplite.c1
-rw-r--r--net/ipv6/udplite.c1
5 files changed, 0 insertions, 23 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 2aab9b63bf16..1bc57609f8e1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1242,8 +1242,6 @@ static inline int __sk_prot_rehash(struct sock *sk)
1242 return sk->sk_prot->hash(sk); 1242 return sk->sk_prot->hash(sk);
1243} 1243}
1244 1244
1245void sk_prot_clear_portaddr_nulls(struct sock *sk, int size);
1246
1247/* About 10 seconds */ 1245/* About 10 seconds */
1248#define SOCK_DESTROY_TIME (10*HZ) 1246#define SOCK_DESTROY_TIME (10*HZ)
1249 1247
diff --git a/net/core/sock.c b/net/core/sock.c
index 25dab8b60223..2b09c2967e21 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1315,24 +1315,6 @@ static void sock_copy(struct sock *nsk, const struct sock *osk)
1315#endif 1315#endif
1316} 1316}
1317 1317
1318void sk_prot_clear_portaddr_nulls(struct sock *sk, int size)
1319{
1320 unsigned long nulls1, nulls2;
1321
1322 nulls1 = offsetof(struct sock, __sk_common.skc_node.next);
1323 nulls2 = offsetof(struct sock, __sk_common.skc_portaddr_node.next);
1324 if (nulls1 > nulls2)
1325 swap(nulls1, nulls2);
1326
1327 if (nulls1 != 0)
1328 memset((char *)sk, 0, nulls1);
1329 memset((char *)sk + nulls1 + sizeof(void *), 0,
1330 nulls2 - nulls1 - sizeof(void *));
1331 memset((char *)sk + nulls2 + sizeof(void *), 0,
1332 size - nulls2 - sizeof(void *));
1333}
1334EXPORT_SYMBOL(sk_prot_clear_portaddr_nulls);
1335
1336static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, 1318static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
1337 int family) 1319 int family)
1338{ 1320{
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index e9ffc27b23d0..f0ebb0bd1e11 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2237,7 +2237,6 @@ struct proto udp_prot = {
2237 .compat_setsockopt = compat_udp_setsockopt, 2237 .compat_setsockopt = compat_udp_setsockopt,
2238 .compat_getsockopt = compat_udp_getsockopt, 2238 .compat_getsockopt = compat_udp_getsockopt,
2239#endif 2239#endif
2240 .clear_sk = sk_prot_clear_portaddr_nulls,
2241 .diag_destroy = udp_abort, 2240 .diag_destroy = udp_abort,
2242}; 2241};
2243EXPORT_SYMBOL(udp_prot); 2242EXPORT_SYMBOL(udp_prot);
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index 3b3efbda48e1..67fc9d96e67d 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -61,7 +61,6 @@ struct proto udplite_prot = {
61 .compat_setsockopt = compat_udp_setsockopt, 61 .compat_setsockopt = compat_udp_setsockopt,
62 .compat_getsockopt = compat_udp_getsockopt, 62 .compat_getsockopt = compat_udp_getsockopt,
63#endif 63#endif
64 .clear_sk = sk_prot_clear_portaddr_nulls,
65}; 64};
66EXPORT_SYMBOL(udplite_prot); 65EXPORT_SYMBOL(udplite_prot);
67 66
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c
index 118057a5b759..5cf0099b86f7 100644
--- a/net/ipv6/udplite.c
+++ b/net/ipv6/udplite.c
@@ -56,7 +56,6 @@ struct proto udplitev6_prot = {
56 .compat_setsockopt = compat_udpv6_setsockopt, 56 .compat_setsockopt = compat_udpv6_setsockopt,
57 .compat_getsockopt = compat_udpv6_getsockopt, 57 .compat_getsockopt = compat_udpv6_getsockopt,
58#endif 58#endif
59 .clear_sk = sk_prot_clear_portaddr_nulls,
60}; 59};
61 60
62static struct inet_protosw udplite6_protosw = { 61static struct inet_protosw udplite6_protosw = {