diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-19 17:22:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-19 17:22:29 -0700 |
| commit | 83de2fa53b22686dc07e00d46e7bc83d5046b919 (patch) | |
| tree | 7d8a46c893f4ec1964e68bd17374074b9dc13773 /include | |
| parent | 717a2c9cb13e078b75cc34489775c173d3a2920b (diff) | |
[PATCH] hlist_add_after() fix
From: "Pedro Emanuel M. D. Pinto" <pepinto@student.dei.uc.pt>
This currently-unused function is incorrectly implemented. Fix.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/list.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 34fd74e050df..9e0c971ded6f 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -610,9 +610,12 @@ static inline void hlist_add_before(struct hlist_node *n, static inline void hlist_add_after(struct hlist_node *n, struct hlist_node *next) { - next->next = n->next; - *(next->pprev) = n; - n->next = next; + next->next = n->next; + n->next = next; + next->pprev = &n->next; + + if(next->next) + next->next->pprev = &next->next; } #define hlist_entry(ptr, type, member) container_of(ptr,type,member) |
