004-backports-add-skb_free_frag.patch 558 B

123456789101112131415161718192021
  1. From: Felix Fietkau <nbd@openwrt.org>
  2. Date: Thu, 28 Jan 2016 15:16:35 +0100
  3. Subject: [PATCH] backports: add skb_free_frag()
  4. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  5. ---
  6. --- a/backport-include/linux/skbuff.h
  7. +++ b/backport-include/linux/skbuff.h
  8. @@ -300,4 +300,11 @@ int skb_ensure_writable(struct sk_buff *
  9. #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */
  10. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
  11. +static inline void skb_free_frag(void *data)
  12. +{
  13. + put_page(virt_to_head_page(data));
  14. +}
  15. +#endif
  16. +
  17. #endif /* __BACKPORT_SKBUFF_H */