sysfs: remove s_sibling hacks
[pandora-kernel.git] / fs / sysfs / sysfs.h
index 845ab3a..3c26168 100644 (file)
@@ -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;
 
@@ -19,6 +20,10 @@ struct sysfs_elem_dir {
        struct kobject          *kobj;
        /* children list starts here and goes through sd->s_sibling */
        struct sysfs_dirent     *children;
+
+       unsigned long           subdirs;
+
+       struct rb_root          name_tree;
 };
 
 struct sysfs_elem_symlink {
@@ -59,6 +64,13 @@ struct sysfs_dirent {
        struct sysfs_dirent     *s_sibling;
        const char              *s_name;
 
+       struct rb_node          name_node;
+
+       union {
+               struct completion       *completion;
+               struct sysfs_dirent     *removed_list;
+       } u;
+
        const void              *s_ns; /* namespace tag */
        union {
                struct sysfs_elem_dir           s_dir;