[PATCH 068/196] kset: move /sys/slab to /sys/kernel/slab

From: Greg Kroah-Hartman
Date: Fri Jan 25 2008 - 02:39:12 EST


/sys/kernel is where these things should go.
Also updated the documentation and tool that used this directory.

Cc: Kay Sievers <kay.sievers@xxxxxxxx>
Acked-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
Documentation/vm/slabinfo.c | 2 +-
Documentation/vm/slub.txt | 2 +-
mm/slub.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c
index 7047696..488c1f3 100644
--- a/Documentation/vm/slabinfo.c
+++ b/Documentation/vm/slabinfo.c
@@ -1021,7 +1021,7 @@ void read_slab_dir(void)
char *t;
int count;

- if (chdir("/sys/slab"))
+ if (chdir("/sys/kernel/slab"))
fatal("SYSFS support for SLUB not active\n");

dir = opendir(".");
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt
index d17f324..dcf8bcf 100644
--- a/Documentation/vm/slub.txt
+++ b/Documentation/vm/slub.txt
@@ -63,7 +63,7 @@ In case you forgot to enable debugging on the kernel command line: It is
possible to enable debugging manually when the kernel is up. Look at the
contents of:

-/sys/slab/<slab name>/
+/sys/kernel/slab/<slab name>/

Look at the writable files. Writing 1 to them will enable the
corresponding debug option. All options can be set on a slab that does
diff --git a/mm/slub.c b/mm/slub.c
index 886131c..b6c7946 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4091,7 +4091,8 @@ static int __init slab_sysfs_init(void)
struct kmem_cache *s;
int err;

- slab_kset = kset_create_and_add("slab", &slab_uevent_ops, NULL);
+ slab_kset = kset_create_and_add("slab", &slab_uevent_ops,
+ &kernel_kset->kobj);
if (!slab_kset) {
printk(KERN_ERR "Cannot register slab subsystem.\n");
return -ENOSYS;
--
1.5.3.8

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/