diff options
author | Eric Dumazet <edumazet@google.com> | 2016-08-23 14:39:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-24 02:25:29 -0400 |
commit | ba2489b0e0113f68a25fe7a563842c2b591829d7 (patch) | |
tree | 1eb76062dddfc69baabb51a4aba9e69c02908052 | |
parent | 391bb6be6578829540bc466fc85da44a68148b84 (diff) |
net: remove clear_sk() method
We no longer use this handler, we can delete it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/sock.h | 1 | ||||
-rw-r--r-- | net/core/sock.c | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 1bc57609f8e1..c797c57f4d9f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1020,7 +1020,6 @@ struct proto { | |||
1020 | void (*unhash)(struct sock *sk); | 1020 | void (*unhash)(struct sock *sk); |
1021 | void (*rehash)(struct sock *sk); | 1021 | void (*rehash)(struct sock *sk); |
1022 | int (*get_port)(struct sock *sk, unsigned short snum); | 1022 | int (*get_port)(struct sock *sk, unsigned short snum); |
1023 | void (*clear_sk)(struct sock *sk, int size); | ||
1024 | 1023 | ||
1025 | /* Keeping track of sockets in use */ | 1024 | /* Keeping track of sockets in use */ |
1026 | #ifdef CONFIG_PROC_FS | 1025 | #ifdef CONFIG_PROC_FS |
diff --git a/net/core/sock.c b/net/core/sock.c index 2b09c2967e21..51a730485649 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1326,12 +1326,8 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, | |||
1326 | sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO); | 1326 | sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO); |
1327 | if (!sk) | 1327 | if (!sk) |
1328 | return sk; | 1328 | return sk; |
1329 | if (priority & __GFP_ZERO) { | 1329 | if (priority & __GFP_ZERO) |
1330 | if (prot->clear_sk) | 1330 | sk_prot_clear_nulls(sk, prot->obj_size); |
1331 | prot->clear_sk(sk, prot->obj_size); | ||
1332 | else | ||
1333 | sk_prot_clear_nulls(sk, prot->obj_size); | ||
1334 | } | ||
1335 | } else | 1331 | } else |
1336 | sk = kmalloc(prot->obj_size, priority); | 1332 | sk = kmalloc(prot->obj_size, priority); |
1337 | 1333 | ||