Since skb_abort_seq_read() has been removed in the patch "net: Unmap fragment page once iterator is done" in linux, but is still needed for older kernel, add compat code to call it after the iteration is done.
Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de --- compat.h | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/compat.h b/compat.h index ddc1b29..e9b531f 100644 --- a/compat.h +++ b/compat.h @@ -326,6 +326,14 @@ static int __batadv_interface_set_mac_addr(x, y)
#define netdev_notifier_info_to_dev(ptr) ptr
+/* older kernels still need to call skb_abort_seq_read() */ +#define skb_seq_read(consumed, data, st) \ + ({ \ + int len = skb_seq_read(consumed, data, st); \ + if (len == 0) \ + skb_abort_seq_read(st); \ + len; \ + }) #endif /* < KERNEL_VERSION(3, 11, 0) */
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */