From patchwork Wed Jun 26 09:37:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 3192 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id 177D4601F12 for ; Wed, 26 Jun 2013 11:38:01 +0200 (CEST) Received: from p4ffe515e.dip0.t-ipconnect.de ([79.254.81.94] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1UrmAq-0004Ul-Ct; Wed, 26 Jun 2013 11:38:00 +0200 Received: from dotslash by pandem0nium with local (Exim 4.80) (envelope-from ) id 1UrmAn-0003Ri-Q7; Wed, 26 Jun 2013 11:37:57 +0200 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 26 Jun 2013 11:37:51 +0200 Message-Id: <1372239472-13217-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.10.4 X-purgate: clean X-purgate-type: clean X-purgate-ID: 154106::1372239480-000004FE-6876E91D/0-0/0-0 X-Scan-AV: nick.hrz.tu-chemnitz.de; 2013-06-26 11:38:00; b179329598c495454195b000c92d4763 X-Scan-SA: nick.hrz.tu-chemnitz.de; 2013-06-26 11:38:00; 00acbf05fdfca154dfa130bfe458f4bf X-Spam-Score: -1.0 (-) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (-1.0 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP --- Ende Textanalyse Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: compat-code for skb_abort_seq_read() X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jun 2013 09:38:01 -0000 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 --- 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_ */