summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 23:28:19 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 23:28:19 +0200
commit54e2a3270f4d5f50aefb08630a3c3c758b9c2723 (patch)
tree2d28170316f42778217fb16a0df1afe5898a2ce7 /include
parentMerge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
parentdebugobjects: fix lockdep warning (diff)
downloadlinux-54e2a3270f4d5f50aefb08630a3c3c758b9c2723.tar.xz
linux-54e2a3270f4d5f50aefb08630a3c3c758b9c2723.zip
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) \