static inline
void cds_list_add_rcu(struct cds_list_head *newp, struct cds_list_head *head)
{
- newp->next = head->next;
+ struct cds_list_head *first = head->next;
+
+ newp->next = first;
newp->prev = head;
head->next->prev = newp;
rcu_assign_pointer(head->next, newp);