Skip to contentSkip to conversation

remove space in /proc/slabinfo cache_name

PATCH In review [email protected] 2 participants 2 messages May 25, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove space in /proc/slabinfo cache_name

Most /proc/slabinfo cache_names are in the format:
cache_name. There are a couple with spaces in the name, which is inconsistent and requires a special case when scripting.

Changes "fasync cache" and "file lock cache" to have the usual underscore.

Tested on 2.5.18. Applies to 2.4.19-pre8 with offset.

fs/fcntl.c +1 -1
diff -ruN linux-2.5.18/fs/fcntl.c linux-2.5.18.new/fs/fcntl.c
@@ -551,7 +551,7 @@
 
 static int __init fasync_init(void)
 {
-	fasync_cache = kmem_cache_create("fasync cache",
+	fasync_cache = kmem_cache_create("fasync_cache",
 		sizeof(struct fasync_struct), 0, 0, NULL, NULL);
 	if (!fasync_cache)
 		panic("cannot create fasync slab cache");
fs/locks.c +1 -1
diff -ruN linux-2.5.18/fs/locks.c linux-2.5.18.new/fs/locks.c
@@ -1940,7 +1940,7 @@
 
 static int __init filelock_init(void)
 {
-	filelock_cache = kmem_cache_create("file lock cache",
+	filelock_cache = kmem_cache_create("file_lock_cache",
 			sizeof(struct file_lock), 0, 0, init_once, NULL);
 	if (!filelock_cache)
 		panic("cannot create file lock slab cache");
Signature · 1 line
Randy Hron
#1 lore raw
Quoted 7 lines · On Sat, May 25, 2002 at 02:33:56PM -0400, [email protected] wrote:

Most /proc/slabinfo cache_names are in the format:
cache_name. There are a couple with spaces in the name, which is inconsistent and requires a special case when scripting.

Changes "fasync cache" and "file lock cache" to have the usual underscore.

Ryan Mack did this back circa 2.5.9, and also changed one extra that you missed..

http://www.codemonkey.org.uk/patches/merged/2.5.9/dj1/slabcache-namespace.diff

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs