SLAB_PANIC more (proc, posix-timers, shmem)
authorAlexey Dobriyan <adobriyan@sw.ru>
Wed, 17 Oct 2007 06:26:10 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:47 +0000 (08:42 -0700)
These aren't modular, so SLAB_PANIC is OK.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/inode.c
kernel/posix-timers.c
mm/shmem.c

index 7cffa433a3c8ab35945b431c29c6b7cc1dd10727..99ca00485fc307ff52014dc303b60fd918f87de4 100644 (file)
@@ -119,10 +119,8 @@ int __init proc_init_inodecache(void)
        proc_inode_cachep = kmem_cache_create("proc_inode_cache",
                                             sizeof(struct proc_inode),
                                             0, (SLAB_RECLAIM_ACCOUNT|
-                                               SLAB_MEM_SPREAD),
+                                               SLAB_MEM_SPREAD|SLAB_PANIC),
                                             init_once);
-       if (proc_inode_cachep == NULL)
-               return -ENOMEM;
        return 0;
 }
 
index 57efe0400bc2a133b7b1bb055e597345c567450f..d71ed09fe1dddd985e79f882ff30dd26bf1d28a2 100644 (file)
@@ -241,7 +241,8 @@ static __init int init_posix_timers(void)
        register_posix_clock(CLOCK_MONOTONIC, &clock_monotonic);
 
        posix_timers_cache = kmem_cache_create("posix_timers_cache",
-                                       sizeof (struct k_itimer), 0, 0, NULL);
+                                       sizeof (struct k_itimer), 0, SLAB_PANIC,
+                                       NULL);
        idr_init(&posix_timers_id);
        return 0;
 }
index 204865750fe4610362454c27f27753022b0d7425..6fa20a84daa01e1afca5a01ec2ae01b9ec9bac9e 100644 (file)
@@ -2343,9 +2343,7 @@ static int init_inodecache(void)
 {
        shmem_inode_cachep = kmem_cache_create("shmem_inode_cache",
                                sizeof(struct shmem_inode_info),
-                               0, 0, init_once);
-       if (shmem_inode_cachep == NULL)
-               return -ENOMEM;
+                               0, SLAB_PANIC, init_once);
        return 0;
 }