summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-29 00:39:10 +0100
committerDavid S. Miller <davem@davemloft.net>2008-03-29 00:39:10 +0100
commit60e7663d462af3994f292cb3691ea4f7371a9220 (patch)
tree84eb3c792c8f3c46d77e0296855ea37ae573b24a /net/core
parent[SOCK]: Introduce a percpu inuse counters array (v2). (diff)
downloadlinux-60e7663d462af3994f292cb3691ea4f7371a9220.tar.xz
linux-60e7663d462af3994f292cb3691ea4f7371a9220.zip
[SOCK]: Drop per-proto inuse init and fre functions (v2).
Constructive part of the set is finished here. We have to remove the pcounter, so start with its init and free functions. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 174c64bc7a43..c1ae56eb96ec 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1999,11 +1999,6 @@ int proto_register(struct proto *prot, int alloc_slab)
char *request_sock_slab_name = NULL;
char *timewait_sock_slab_name;
- if (sock_prot_inuse_init(prot) != 0) {
- printk(KERN_CRIT "%s: Can't alloc inuse counters!\n", prot->name);
- goto out;
- }
-
if (alloc_slab) {
prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
SLAB_HWCACHE_ALIGN, NULL);
@@ -2011,7 +2006,7 @@ int proto_register(struct proto *prot, int alloc_slab)
if (prot->slab == NULL) {
printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n",
prot->name);
- goto out_free_inuse;
+ goto out;
}
if (prot->rsk_prot != NULL) {
@@ -2070,8 +2065,6 @@ out_free_request_sock_slab_name:
out_free_sock_slab:
kmem_cache_destroy(prot->slab);
prot->slab = NULL;
-out_free_inuse:
- sock_prot_inuse_free(prot);
out:
return -ENOBUFS;
}
@@ -2085,8 +2078,6 @@ void proto_unregister(struct proto *prot)
list_del(&prot->node);
write_unlock(&proto_list_lock);
- sock_prot_inuse_free(prot);
-
if (prot->slab != NULL) {
kmem_cache_destroy(prot->slab);
prot->slab = NULL;