From: Weiping Pan <wpan@redhat.com>
Date: Fri, 28 Sep 2012 20:15:30 +0000 (+0000)
Subject: use skb_end_offset() in skb_try_coalesce()
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4b549a5ac818722fc13d789584f41f4e00d78b5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

use skb_end_offset() in skb_try_coalesce()

Commit ec47ea824774(skb: Add inline helper for getting the skb end offset from
head) introduces this helper function, skb_end_offset(),
we should make use of it.

Signed-off-by: Weiping Pan <wpan@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index d607bae075d5..cdc28598f4ef 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3483,8 +3483,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
 		    skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS)
 			return false;
 
-		delta = from->truesize -
-			SKB_TRUESIZE(skb_end_pointer(from) - from->head);
+		delta = from->truesize - SKB_TRUESIZE(skb_end_offset(from));
 	}
 
 	WARN_ON_ONCE(delta < len);