aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
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 /kernel
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 'kernel')
-rw-r--r--kernel/fork.c18
-rw-r--r--kernel/nsproxy.c2
-rw-r--r--kernel/posix-timers.c2
-rw-r--r--kernel/user.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 469838998220..7332e236d367 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -137,7 +137,7 @@ void __init fork_init(unsigned long mempages)
137 /* create a slab on which task_structs can be allocated */ 137 /* create a slab on which task_structs can be allocated */
138 task_struct_cachep = 138 task_struct_cachep =
139 kmem_cache_create("task_struct", sizeof(struct task_struct), 139 kmem_cache_create("task_struct", sizeof(struct task_struct),
140 ARCH_MIN_TASKALIGN, SLAB_PANIC, NULL, NULL); 140 ARCH_MIN_TASKALIGN, SLAB_PANIC, NULL);
141#endif 141#endif
142 142
143 /* 143 /*
@@ -1446,22 +1446,22 @@ void __init proc_caches_init(void)
1446 sighand_cachep = kmem_cache_create("sighand_cache", 1446 sighand_cachep = kmem_cache_create("sighand_cache",
1447 sizeof(struct sighand_struct), 0, 1447 sizeof(struct sighand_struct), 0,
1448 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU, 1448 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_DESTROY_BY_RCU,
1449 sighand_ctor, NULL); 1449 sighand_ctor);
1450 signal_cachep = kmem_cache_create("signal_cache", 1450 signal_cachep = kmem_cache_create("signal_cache",
1451 sizeof(struct signal_struct), 0, 1451 sizeof(struct signal_struct), 0,
1452 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 1452 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
1453 files_cachep = kmem_cache_create("files_cache", 1453 files_cachep = kmem_cache_create("files_cache",
1454 sizeof(struct files_struct), 0, 1454 sizeof(struct files_struct), 0,
1455 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 1455 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
1456 fs_cachep = kmem_cache_create("fs_cache", 1456 fs_cachep = kmem_cache_create("fs_cache",
1457 sizeof(struct fs_struct), 0, 1457 sizeof(struct fs_struct), 0,
1458 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 1458 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
1459 vm_area_cachep = kmem_cache_create("vm_area_struct", 1459 vm_area_cachep = kmem_cache_create("vm_area_struct",
1460 sizeof(struct vm_area_struct), 0, 1460 sizeof(struct vm_area_struct), 0,
1461 SLAB_PANIC, NULL, NULL); 1461 SLAB_PANIC, NULL);
1462 mm_cachep = kmem_cache_create("mm_struct", 1462 mm_cachep = kmem_cache_create("mm_struct",
1463 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, 1463 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
1464 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 1464 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
1465} 1465}
1466 1466
1467/* 1467/*
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 10f0bbba382b..a4fb7d46971f 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -193,7 +193,7 @@ int unshare_nsproxy_namespaces(unsigned long unshare_flags,
193static int __init nsproxy_cache_init(void) 193static int __init nsproxy_cache_init(void)
194{ 194{
195 nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), 195 nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
196 0, SLAB_PANIC, NULL, NULL); 196 0, SLAB_PANIC, NULL);
197 return 0; 197 return 0;
198} 198}
199 199
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 329ce0172074..55b3761edaa9 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -241,7 +241,7 @@ static __init int init_posix_timers(void)
241 register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic); 241 register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic);
242 242
243 posix_timers_cache = kmem_cache_create("posix_timers_cache", 243 posix_timers_cache = kmem_cache_create("posix_timers_cache",
244 sizeof (struct k_itimer), 0, 0, NULL, NULL); 244 sizeof (struct k_itimer), 0, 0, NULL);
245 idr_init(&posix_timers_id); 245 idr_init(&posix_timers_id);
246 return 0; 246 return 0;
247} 247}
diff --git a/kernel/user.c b/kernel/user.c
index 98b82507797a..e7d11cef6998 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -208,7 +208,7 @@ static int __init uid_cache_init(void)
208 int n; 208 int n;
209 209
210 uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct), 210 uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct),
211 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 211 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
212 212
213 for(n = 0; n < UIDHASH_SZ; ++n) 213 for(n = 0; n < UIDHASH_SZ; ++n)
214 INIT_LIST_HEAD(init_user_ns.uidhash_table + n); 214 INIT_LIST_HEAD(init_user_ns.uidhash_table + n);