]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
slabinfo: fall back from /sys/kernel/slab to /sys/slab
authorChristoph Lameter <clameter@sgi.com>
Tue, 5 Feb 2008 07:35:48 +0000 (23:35 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Feb 2008 23:27:06 +0000 (15:27 -0800)
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 <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/vm/slabinfo.c

index 7123fee708ca9fa3f08c102f6e82247f7a60fbae..22d7e3e4d60ce06df281d77d2b5638b76ded932b 100644 (file)
@@ -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(".");