Skip to content

Commit

Permalink
llist: Add llist_next()
Browse files Browse the repository at this point in the history
So we don't have to expose the struct list_node member.

Cc: Huang Ying <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1315836348.26517.41.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Oct 4, 2011
1 parent 38aaf80 commit 924f8f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/linux/llist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kernel/irq_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 924f8f5

Please sign in to comment.