proc: use rb_entry()
[linux-2.6-microblaze.git] / fs / proc / generic.c
index f6a01f0..06c7390 100644 (file)
@@ -57,9 +57,9 @@ static struct proc_dir_entry *pde_subdir_find(struct proc_dir_entry *dir,
        struct rb_node *node = dir->subdir.rb_node;
 
        while (node) {
-               struct proc_dir_entry *de = container_of(node,
-                                                        struct proc_dir_entry,
-                                                        subdir_node);
+               struct proc_dir_entry *de = rb_entry(node,
+                                                    struct proc_dir_entry,
+                                                    subdir_node);
                int result = proc_match(len, name, de);
 
                if (result < 0)
@@ -80,8 +80,9 @@ static bool pde_subdir_insert(struct proc_dir_entry *dir,
 
        /* Figure out where to put new node */
        while (*new) {
-               struct proc_dir_entry *this =
-                       container_of(*new, struct proc_dir_entry, subdir_node);
+               struct proc_dir_entry *this = rb_entry(*new,
+                                                      struct proc_dir_entry,
+                                                      subdir_node);
                int result = proc_match(de->namelen, de->name, this);
 
                parent = *new;