From patchwork Sat Aug 14 21:07:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 336 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.net (Postfix) with SMTP id 6C0D7154579 for ; Sat, 14 Aug 2010 23:08:14 +0200 (CEST) Received: (qmail invoked by alias); 14 Aug 2010 21:08:13 -0000 Received: from unknown (EHLO sven-desktop.lazhur.ath.cx) [89.246.199.18] by mail.gmx.net (mp063) with SMTP; 14 Aug 2010 23:08:13 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX19brbwMgAJboZkxebcXE0ENGT4chpjAZIxkCjfTnX ZIq0MRdqmt3mOq From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 14 Aug 2010 23:07:59 +0200 Message-Id: <1281820085-13507-3-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1281820085-13507-1-git-send-email-sven.eckelmann@gmx.de> References: <1281820085-13507-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH 3/9] batman-adv: Provide skb_cow_head on kernels prior 2.6.23 X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 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: Sat, 14 Aug 2010 21:08:14 -0000 skb_cow_head was first introduced in v2.6.23-rc6-155-gd9cc204 and we must use skb_cow on those kernel which will also copy the skb when it shares data with other skbs and not only when the header is only shared. Signed-off-by: Sven Eckelmann --- batman-adv/compat.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/batman-adv/compat.h b/batman-adv/compat.h index f0f0b16..5bf1532 100644 --- a/batman-adv/compat.h +++ b/batman-adv/compat.h @@ -70,6 +70,11 @@ static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len) return 0; } +static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) +{ + return skb_cow(skb, headroom); +} + #define cancel_delayed_work_sync(wq) cancel_delayed_work(wq) #endif /* < KERNEL_VERSION(2, 6, 23) */