summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-08-23 21:39:29 +0300
committerDavid S. Miller <davem@davemloft.net>2016-08-24 09:25:29 +0300
commitba2489b0e0113f68a25fe7a563842c2b591829d7 (patch)
tree1eb76062dddfc69baabb51a4aba9e69c02908052 /net
parent391bb6be6578829540bc466fc85da44a68148b84 (diff)
downloadlinux-ba2489b0e0113f68a25fe7a563842c2b591829d7.tar.xz
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>
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c8
1 files changed, 2 insertions, 6 deletions
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,
sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO);
if (!sk)
return sk;
- if (priority & __GFP_ZERO) {
- if (prot->clear_sk)
- prot->clear_sk(sk, prot->obj_size);
- else
- sk_prot_clear_nulls(sk, prot->obj_size);
- }
+ if (priority & __GFP_ZERO)
+ sk_prot_clear_nulls(sk, prot->obj_size);
} else
sk = kmalloc(prot->obj_size, priority);