net: remove clear_sk() method
authorEric Dumazet <edumazet@google.com>
Tue, 23 Aug 2016 18:39:29 +0000 (11:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2016 06:25:29 +0000 (23:25 -0700)
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>
include/net/sock.h
net/core/sock.c

index 1bc57609f8e193100b576bc8f91508d603733267..c797c57f4d9f6b2ef6cc23f1d63210cd41c8cff4 100644 (file)
@@ -1020,7 +1020,6 @@ struct proto {
        void                    (*unhash)(struct sock *sk);
        void                    (*rehash)(struct sock *sk);
        int                     (*get_port)(struct sock *sk, unsigned short snum);
-       void                    (*clear_sk)(struct sock *sk, int size);
 
        /* Keeping track of sockets in use */
 #ifdef CONFIG_PROC_FS
index 2b09c2967e212658ce4753e41f8ba8c4f0988b0e..51a730485649e6e2cefac6d58de3a021411a6a0f 100644 (file)
@@ -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);