Index: linux-2.4.18-chaos/include/linux/list.h
===================================================================
---- linux-2.4.18-chaos.orig/include/linux/list.h 2003-10-22 13:43:39.000000000 +0400
-+++ linux-2.4.18-chaos/include/linux/list.h 2003-10-22 13:44:17.000000000 +0400
-@@ -173,6 +173,16 @@
+--- linux-2.4.18-chaos.orig/include/linux/list.h 2003-11-23 00:07:05.000000000 +0300
++++ linux-2.4.18-chaos/include/linux/list.h 2003-12-10 22:05:23.000000000 +0300
+@@ -173,6 +173,29 @@
for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
pos = pos->prev, prefetch(pos->prev))
++/**
++ * list_for_each_entry - iterate over list of given type
++ * @pos: the type * to use as a loop counter.
++ * @head: the head for your list.
++ * @member: the name of the list_struct within the struct.
++ */
++#define list_for_each_entry(pos, head, member) \
++ for (pos = list_entry((head)->next, typeof(*pos), member), \
++ prefetch(pos->member.next); \
++ &pos->member != (head); \
++ pos = list_entry(pos->member.next, typeof(*pos), member), \
++ prefetch(pos->member.next))
++
+/* 2.5 uses hlists for some things, like the d_hash. we'll treat them
+ * as 2.5 and let macros drop back.. */
+#define hlist_entry list_entry