aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-07-19 21:11:58 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-07-19 21:11:58 -0400
commit20c2df83d25c6a95affe6157a4c9cac4cf5ffaac (patch)
tree415c4453d2b17a50abe7a3e515177e1fa337bd67 /net/core
parent64fb98fc40738ae1a98bcea9ca3145b89fb71524 (diff)
mm: Remove slab destructors from kmem_cache_create().
Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow.c2
-rw-r--r--net/core/neighbour.c2
-rw-r--r--net/core/skbuff.c4
-rw-r--r--net/core/sock.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/net/core/flow.c b/net/core/flow.c
index 051430545a05..0ab5234b17d8 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -350,7 +350,7 @@ static int __init flow_cache_init(void)
350 flow_cachep = kmem_cache_create("flow_cache", 350 flow_cachep = kmem_cache_create("flow_cache",
351 sizeof(struct flow_cache_entry), 351 sizeof(struct flow_cache_entry),
352 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, 352 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
353 NULL, NULL); 353 NULL);
354 flow_hash_shift = 10; 354 flow_hash_shift = 10;
355 flow_lwm = 2 * flow_hash_size; 355 flow_lwm = 2 * flow_hash_size;
356 flow_hwm = 4 * flow_hash_size; 356 flow_hwm = 4 * flow_hash_size;
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 9df26a07f067..ca2a1533138a 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1347,7 +1347,7 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
1347 tbl->kmem_cachep = 1347 tbl->kmem_cachep =
1348 kmem_cache_create(tbl->id, tbl->entry_size, 0, 1348 kmem_cache_create(tbl->id, tbl->entry_size, 0,
1349 SLAB_HWCACHE_ALIGN|SLAB_PANIC, 1349 SLAB_HWCACHE_ALIGN|SLAB_PANIC,
1350 NULL, NULL); 1350 NULL);
1351 tbl->stats = alloc_percpu(struct neigh_statistics); 1351 tbl->stats = alloc_percpu(struct neigh_statistics);
1352 if (!tbl->stats) 1352 if (!tbl->stats)
1353 panic("cannot create neighbour cache statistics"); 1353 panic("cannot create neighbour cache statistics");
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 0583e8498f13..35021eb3ed07 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2021,13 +2021,13 @@ void __init skb_init(void)
2021 sizeof(struct sk_buff), 2021 sizeof(struct sk_buff),
2022 0, 2022 0,
2023 SLAB_HWCACHE_ALIGN|SLAB_PANIC, 2023 SLAB_HWCACHE_ALIGN|SLAB_PANIC,
2024 NULL, NULL); 2024 NULL);
2025 skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", 2025 skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache",
2026 (2*sizeof(struct sk_buff)) + 2026 (2*sizeof(struct sk_buff)) +
2027 sizeof(atomic_t), 2027 sizeof(atomic_t),
2028 0, 2028 0,
2029 SLAB_HWCACHE_ALIGN|SLAB_PANIC, 2029 SLAB_HWCACHE_ALIGN|SLAB_PANIC,
2030 NULL, NULL); 2030 NULL);
2031} 2031}
2032 2032
2033/** 2033/**
diff --git a/net/core/sock.c b/net/core/sock.c
index 239a08a6ff24..bd209c4477a9 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1767,7 +1767,7 @@ int proto_register(struct proto *prot, int alloc_slab)
1767 1767
1768 if (alloc_slab) { 1768 if (alloc_slab) {
1769 prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, 1769 prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
1770 SLAB_HWCACHE_ALIGN, NULL, NULL); 1770 SLAB_HWCACHE_ALIGN, NULL);
1771 1771
1772 if (prot->slab == NULL) { 1772 if (prot->slab == NULL) {
1773 printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", 1773 printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n",
@@ -1785,7 +1785,7 @@ int proto_register(struct proto *prot, int alloc_slab)
1785 sprintf(request_sock_slab_name, mask, prot->name); 1785 sprintf(request_sock_slab_name, mask, prot->name);
1786 prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name, 1786 prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name,
1787 prot->rsk_prot->obj_size, 0, 1787 prot->rsk_prot->obj_size, 0,
1788 SLAB_HWCACHE_ALIGN, NULL, NULL); 1788 SLAB_HWCACHE_ALIGN, NULL);
1789 1789
1790 if (prot->rsk_prot->slab == NULL) { 1790 if (prot->rsk_prot->slab == NULL) {
1791 printk(KERN_CRIT "%s: Can't create request sock SLAB cache!\n", 1791 printk(KERN_CRIT "%s: Can't create request sock SLAB cache!\n",
@@ -1807,7 +1807,7 @@ int proto_register(struct proto *prot, int alloc_slab)
1807 kmem_cache_create(timewait_sock_slab_name, 1807 kmem_cache_create(timewait_sock_slab_name,
1808 prot->twsk_prot->twsk_obj_size, 1808 prot->twsk_prot->twsk_obj_size,
1809 0, SLAB_HWCACHE_ALIGN, 1809 0, SLAB_HWCACHE_ALIGN,
1810 NULL, NULL); 1810 NULL);
1811 if (prot->twsk_prot->twsk_slab == NULL) 1811 if (prot->twsk_prot->twsk_slab == NULL)
1812 goto out_free_timewait_sock_slab_name; 1812 goto out_free_timewait_sock_slab_name;
1813 } 1813 }