diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-07-25 17:55:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-22 17:43:52 -0700 |
commit | 4f72c0cab40536a0be501d85ea4918467ab82ad5 (patch) | |
tree | f5f0cc385fed9a32f7fc4451f8618c3b4120bc3d /fs/sysfs/sysfs.h | |
parent | 7f9838fd01833ffb30177d964983076924344c9e (diff) | |
download | op-kernel-dev-4f72c0cab40536a0be501d85ea4918467ab82ad5.zip op-kernel-dev-4f72c0cab40536a0be501d85ea4918467ab82ad5.tar.gz |
sysfs: use rb-tree for name lookups
sysfs: use rb-tree for name lookups
Use red-black tree for name lookups.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 6348e2c..fe1a9e8 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -11,6 +11,7 @@ #include <linux/lockdep.h> #include <linux/kobject_ns.h> #include <linux/fs.h> +#include <linux/rbtree.h> struct sysfs_open_dirent; @@ -21,6 +22,8 @@ struct sysfs_elem_dir { struct sysfs_dirent *children; unsigned long subdirs; + + struct rb_root name_tree; }; struct sysfs_elem_symlink { @@ -61,6 +64,8 @@ struct sysfs_dirent { struct sysfs_dirent *s_sibling; const char *s_name; + struct rb_node name_node; + const void *s_ns; /* namespace tag */ union { struct sysfs_elem_dir s_dir; |