]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/rbtree_augmented.h
mm, oom_reaper: do not attempt to reap a task more than twice
[mirror_ubuntu-artful-kernel.git] / include / linux / rbtree_augmented.h
index 14d7b831b63a8377dce8161f3bf0be55bf385258..d076183e49bec0b0c843f8b067fbd3d25cc4bce0 100644 (file)
@@ -130,6 +130,19 @@ __rb_change_child(struct rb_node *old, struct rb_node *new,
                WRITE_ONCE(root->rb_node, new);
 }
 
+static inline void
+__rb_change_child_rcu(struct rb_node *old, struct rb_node *new,
+                     struct rb_node *parent, struct rb_root *root)
+{
+       if (parent) {
+               if (parent->rb_left == old)
+                       rcu_assign_pointer(parent->rb_left, new);
+               else
+                       rcu_assign_pointer(parent->rb_right, new);
+       } else
+               rcu_assign_pointer(root->rb_node, new);
+}
+
 extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
        void (*augment_rotate)(struct rb_node *old, struct rb_node *new));