diff mbox series

[25/75] backports: add skb_list_del_init()

Message ID 20240627234808.1253337-26-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:47 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

This got backported to 4.19.10, but we use it for >= 4.19.0,
so provide a backported version for < 4.19.10.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/skbuff.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index 2bcd1036..2daf0601 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -15,8 +15,16 @@  static inline void skb_mark_not_on_list(struct sk_buff *skb)
 {
 	skb->next = NULL;
 }
+#endif /* 4.19.10 <= x < 4.20 || 4.14.217 <= x < 4.15 */
+
+#if !LINUX_VERSION_IN_RANGE(4,19,10, 4,20,0)
+static inline void skb_list_del_init(struct sk_buff *skb)
+{
+	__list_del_entry((struct list_head *)&skb->next);
+	skb_mark_not_on_list(skb);
+}
 #endif /* 4.19.10 <= x < 4.20 */
-#endif
+#endif /* < 4.20 */
 
 #if LINUX_VERSION_IS_LESS(5,4,0)
 /**