Blob Blame History Raw
From: Jonathan Lemon <jonathan.lemon@gmail.com>
Date: Tue, 30 Jul 2019 07:40:34 -0700
Subject: linux: Remove bvec page_offset, use bv_offset
Patch-mainline: v5.4-rc1
Git-commit: 65c84f148e359ed398dcc9ed736131103f40896b
References: bsc#1154353

Now that page_offset is referenced through accessors, remove
the union, and use bv_offset.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 include/linux/bvec.h   |    5 +----
 include/linux/skbuff.h |   10 +++++-----
 2 files changed, 6 insertions(+), 9 deletions(-)

--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -18,10 +18,7 @@
 struct bio_vec {
 	struct page	*bv_page;
 	unsigned int	bv_len;
-	union {
-		__u32		page_offset;
-		unsigned int	bv_offset;
-	};
+	unsigned int	bv_offset;
 };
 
 struct bvec_iter {
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2086,7 +2086,7 @@ static inline void __skb_fill_page_desc(
 	 * on page_is_pfmemalloc doing the right thing(tm).
 	 */
 	frag->bv_page		  = page;
-	frag->page_offset	  = off;
+	frag->bv_offset		  = off;
 	skb_frag_size_set(frag, size);
 
 	page = compound_head(page);
@@ -2871,7 +2871,7 @@ static inline void skb_propagate_pfmemal
  */
 static inline unsigned int skb_frag_off(const skb_frag_t *frag)
 {
-	return frag->page_offset;
+	return frag->bv_offset;
 }
 
 /**
@@ -2881,7 +2881,7 @@ static inline unsigned int skb_frag_off(
  */
 static inline void skb_frag_off_add(skb_frag_t *frag, int delta)
 {
-	frag->page_offset += delta;
+	frag->bv_offset += delta;
 }
 
 /**
@@ -2891,7 +2891,7 @@ static inline void skb_frag_off_add(skb_
  */
 static inline void skb_frag_off_set(skb_frag_t *frag, unsigned int offset)
 {
-	frag->page_offset = offset;
+	frag->bv_offset = offset;
 }
 
 /**
@@ -2902,7 +2902,7 @@ static inline void skb_frag_off_set(skb_
 static inline void skb_frag_off_copy(skb_frag_t *fragto,
 				     const skb_frag_t *fragfrom)
 {
-	fragto->page_offset = fragfrom->page_offset;
+	fragto->bv_offset = fragfrom->bv_offset;
 }
 
 /**