From b6c24de77cbe9afe4962f0738e6444e709e83c81 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 4 Feb 2008 23:35:48 -0800 Subject: slabinfo: fall back from /sys/kernel/slab to /sys/slab I keep running upstream and mm kernels and the location of the slab directory is different since upstream still uses /sys/slab. This patch makes slabinfo check /sys/slab if /sys/kernel/slab is not there. Makes slabinfo work on any kernel. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Documentation/vm/slabinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/vm') diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 7123fee708c..22d7e3e4d60 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c @@ -1123,7 +1123,7 @@ void read_slab_dir(void) char *t; int count; - if (chdir("/sys/kernel/slab")) + if (chdir("/sys/kernel/slab") && chdir("/sys/slab")) fatal("SYSFS support for SLUB not active\n"); dir = opendir("."); -- cgit v1.2.3-70-g09d2