Skip to content

Commit

Permalink
slabinfo: fall back from /sys/kernel/slab to /sys/slab
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Lameter authored and Greg Kroah-Hartman committed Feb 21, 2008
1 parent 82bd3f1 commit b6c24de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/vm/slabinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(".");
Expand Down

0 comments on commit b6c24de

Please sign in to comment.