diff --git a/include/linux/llist.h b/include/linux/llist.h index 27bbdf5ddf82ced8a2f0e2ea33276123de74de8a..e2e96d04ee481cc07d05f0f7513089fb4e969d4a 100644 --- a/include/linux/llist.h +++ b/include/linux/llist.h @@ -138,6 +138,11 @@ static inline bool llist_empty(const struct llist_head *head) return ACCESS_ONCE(head->first) == NULL; } +static inline struct llist_node *llist_next(struct llist_node *node) +{ + return node->next; +} + /** * llist_add - add a new entry * @new: new entry to be added diff --git a/kernel/irq_work.c b/kernel/irq_work.c index 6f0a4310defd92649aaccbf43d5ee69d7c25da37..0e2cde4f380ba7b8b50e37f8ba019538cfb9a6f2 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -110,7 +110,7 @@ void irq_work_run(void) while (llnode != NULL) { work = llist_entry(llnode, struct irq_work, llnode); - llnode = llnode->next; + llnode = llist_next(llnode); /* * Clear the PENDING bit, after this point the @work