Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/include/linux/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head)
*/
static inline void __list_del(struct list_head * prev, struct list_head * next)
{
next->prev = prev;
WRITE_ONCE(prev->next, next);
if (next)
next->prev = prev;
if (prev)
WRITE_ONCE(prev->next, next);
}

/**
Expand Down