以下是include/linux/rculist.h__list_add_rcu
中的实现:
static inline void __list_add_rcu(struct list_head *new,
struct list_head *prev, struct list_head *next)
{
new->next = next;
new->prev = prev;
rcu_assign_pointer(list_next_rcu(prev), new);
next->prev = new;
}
在函数体内,rcu-lock保护 的更新prev->next
,但不保护next->prev
。为什么?我在这里错过了什么明显的东西吗?