summaryrefslogtreecommitdiffstats
path: root/include/linux/list.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-14 17:23:29 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-14 17:23:29 +0200
commit9dfed08eb4086584205717894177a9ee930c88c4 (patch)
tree3455b242f0e85a86d836858a86bd6ffd21279e22 /include/linux/list.h
parent1cf44baad76b6f20f95ece397c6f643320aa44c9 (diff)
parentadee14b2e1557d0a8559f29681732d05a89dfc35 (diff)
downloadblackbird-op-linux-9dfed08eb4086584205717894177a9ee930c88c4.tar.gz
blackbird-op-linux-9dfed08eb4086584205717894177a9ee930c88c4.zip
Merge commit 'v2.6.27-rc6' into core/resources
Diffstat (limited to 'include/linux/list.h')
-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) \
OpenPOWER on IntegriCloud