summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 14:28:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 14:28:19 -0700
commit54e2a3270f4d5f50aefb08630a3c3c758b9c2723 (patch)
tree2d28170316f42778217fb16a0df1afe5898a2ce7 /include
parent41c9229498a2eb89db1c0a77321c61b448738de4 (diff)
parent673d62cc5ea6fca046650f17f77985b112c62322 (diff)
Merge branch 'core/debugobjects' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core/debugobjects' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: debugobjects: fix lockdep warning
Diffstat (limited to 'include')
-rw-r--r--include/linux/list.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index db35ef02e745..969f6e92d089 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -619,6 +619,19 @@ static inline void hlist_add_after(struct hlist_node *n,
next->next->pprev = &next->next;
}
+/*
+ * Move a list from one list head to another. Fixup the pprev
+ * reference of the first entry if it exists.
+ */
+static inline void hlist_move_list(struct hlist_head *old,
+ struct hlist_head *new)
+{
+ new->first = old->first;
+ if (new->first)
+ new->first->pprev = &new->first;
+ old->first = NULL;
+}
+
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
#define hlist_for_each(pos, head) \