public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: compat-code for skb_abort_seq_read()
@ 2013-06-26  9:37 Simon Wunderlich
  2013-08-17 18:04 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Wunderlich @ 2013-06-26  9:37 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

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_ */
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: compat-code for skb_abort_seq_read()
  2013-06-26  9:37 [B.A.T.M.A.N.] [PATCH] batman-adv: compat-code for skb_abort_seq_read() Simon Wunderlich
@ 2013-08-17 18:04 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-08-17 18:04 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

On Wednesday, June 26, 2013 17:37:51 Simon Wunderlich wrote:
> 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(+)

Applied in revision 0d941e8.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-17 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26  9:37 [B.A.T.M.A.N.] [PATCH] batman-adv: compat-code for skb_abort_seq_read() Simon Wunderlich
2013-08-17 18:04 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox