Index: uspace/lib/cpp/include/internal/rbtree_node.hpp
===================================================================
--- uspace/lib/cpp/include/internal/rbtree_node.hpp	(revision af0fbaacf2ef175526f2fed46f9302d6b7b8e500)
+++ uspace/lib/cpp/include/internal/rbtree_node.hpp	(revision cacb5d0b0b55e670408f0c766d5b5a078ba11fd9)
@@ -124,4 +124,13 @@
         }
 
+        const rbtree_node* find_smallest() const
+        {
+            auto res = this;
+            while (res->left)
+                res = res->left;
+
+            return res;
+        }
+
         rbtree_node* find_largest()
         {
@@ -133,5 +142,14 @@
         }
 
-        rbtree_node* successor()
+        const rbtree_node* find_largest() const
+        {
+            auto res = this;
+            while (res->right)
+                res = res->right;
+
+            return res;
+        }
+
+        rbtree_node* successor() const
         {
             if (right)
@@ -167,29 +185,5 @@
         void swap(rbtree_node* other)
         {
-            /**
-             * Parent can be null so we check both ways.
-             */
-            if (is_left_child())
-                parent->left = other;
-            else if (is_right_child())
-                parent->right = other;
-
-            if (other->is_left_child())
-                other->parent->left = this;
-            else if (other->is_right_child())
-                other->parent->right = this;
-
-            if (left)
-                left->parent = other;
-            if (right)
-                right->parent = other;
-            if (other->left)
-                other->left->parent = this;
-            if (other->right)
-                other->right->parent = this;
-
-            std::swap(parent, other->parent);
-            std::swap(left, other->left);
-            std::swap(right, other->right);
+            std::swap(value, other->value);
         }
 
