Skip to contentSkip to conversation

backport sk_for_each_safe

PATCH In review Thierry Escande 1 participant 1 message Apr 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/8 backport sk_for_each_safe

This is needed for NFC core.

---
 backport/include/linux/compat-3.9.h |    4 ++++
 1 file changed, 4 insertions(+)
backport/include/linux/compat-3.9.h +4 -0
index 240a328..aed569c 100644
@@ -186,6 +186,10 @@ static inline void idr_preload_end(void)
 #define sk_for_each(__sk, list) \
 	hlist_for_each_entry(__sk, list, sk_node)
 
+#undef sk_for_each_safe
+#define sk_for_each_safe(__sk, tmp, list) \
+	hlist_for_each_entry_safe(__sk, tmp, list, sk_node)
+
 #define tty_flip_buffer_push(port) tty_flip_buffer_push((port)->tty)
 #define tty_insert_flip_string(port, chars, size) tty_insert_flip_string((port)->tty, chars, size)
 
Signature · 1 line
1.7.10.4