Skip to content

Commit

Permalink
linux: Remove bvec page_offset, use bv_offset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Lemon authored and David S. Miller committed Jul 30, 2019
1 parent b54c9d5 commit 65c84f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions include/linux/bvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
* 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);
Expand Down Expand Up @@ -2863,7 +2863,7 @@ static inline void skb_propagate_pfmemalloc(struct page *page,
*/
static inline unsigned int skb_frag_off(const skb_frag_t *frag)
{
return frag->page_offset;
return frag->bv_offset;
}

/**
Expand All @@ -2873,7 +2873,7 @@ static inline unsigned int skb_frag_off(const skb_frag_t *frag)
*/
static inline void skb_frag_off_add(skb_frag_t *frag, int delta)
{
frag->page_offset += delta;
frag->bv_offset += delta;
}

/**
Expand All @@ -2883,7 +2883,7 @@ static inline void skb_frag_off_add(skb_frag_t *frag, int delta)
*/
static inline void skb_frag_off_set(skb_frag_t *frag, unsigned int offset)
{
frag->page_offset = offset;
frag->bv_offset = offset;
}

/**
Expand All @@ -2894,7 +2894,7 @@ static inline void skb_frag_off_set(skb_frag_t *frag, unsigned int offset)
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;
}

/**
Expand Down

0 comments on commit 65c84f1

Please sign in to comment.