fs/proc: use a rb tree for the directory entries
[deliverable/linux.git] / fs / proc / internal.h
index aa7a0ee182e19329636b21f079fac074145aaa84..7fb1a4869fd0aa2d7779e2b8154a834a71f4d961 100644 (file)
@@ -24,10 +24,9 @@ struct mempolicy;
  * tree) of these proc_dir_entries, so that we can dynamically
  * add new files to /proc.
  *
- * The "next" pointer creates a linked list of one /proc directory,
- * while parent/subdir create the directory structure (every
- * /proc file has a parent, but "subdir" is NULL for all
- * non-directory entries).
+ * parent/subdir are used for the directory structure (every /proc file has a
+ * parent, but "subdir" is empty for all non-directory entries).
+ * subdir_node is used to build the rb tree "subdir" of the parent.
  */
 struct proc_dir_entry {
        unsigned int low_ino;
@@ -38,7 +37,9 @@ struct proc_dir_entry {
        loff_t size;
        const struct inode_operations *proc_iops;
        const struct file_operations *proc_fops;
-       struct proc_dir_entry *next, *parent, *subdir;
+       struct proc_dir_entry *parent;
+       struct rb_root subdir;
+       struct rb_node subdir_node;
        void *data;
        atomic_t count;         /* use count */
        atomic_t in_use;        /* number of callers into module in progress; */
This page took 0.023853 seconds and 5 git commands to generate.