After changing skbuff to use the newly introduced dstref object, skb_dstref_restore is essentially just a setter for the dstref field. Rename the skb_dstref_restore function to skb_dstref_set. Signed-off-by: Marek Mietus --- include/linux/skbuff.h | 6 +++--- include/net/tcp.h | 2 +- net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv4/icmp.c | 2 +- net/ipv4/ip_fragment.c | 2 +- net/ipv4/ip_options.c | 2 +- net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +- net/ipv6/reassembly.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c46f817897a4..b71251372600 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1176,11 +1176,11 @@ static inline dstref_t skb_dstref_steal(struct sk_buff *skb) } /** - * skb_dstref_restore() - restore skb dstref removed via skb_dstref_steal() + * skb_dstref_set() - sets skb dstref * @skb: buffer - * @dstref: dstref object from a call to skb_dstref_steal() + * @dstref: dstref object */ -static inline void skb_dstref_restore(struct sk_buff *skb, dstref_t dstref) +static inline void skb_dstref_set(struct sk_buff *skb, dstref_t dstref) { skb_dst_check_unset(skb); skb->_dstref = dstref; diff --git a/include/net/tcp.h b/include/net/tcp.h index e684f246e798..7a7408ad76fb 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -2103,7 +2103,7 @@ static inline void tcp_skb_tsorted_anchor_cleanup(struct sk_buff *skb) dstref_t _dstref_save = skb_dstref_steal(skb); #define tcp_skb_tsorted_restore(skb) \ - skb_dstref_restore(skb, _dstref_save); \ + skb_dstref_set(skb, _dstref_save); \ } void tcp_write_queue_purge(struct sock *sk); diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c index eb23c70c7416..183fb3f95809 100644 --- a/net/ieee802154/6lowpan/reassembly.c +++ b/net/ieee802154/6lowpan/reassembly.c @@ -146,7 +146,7 @@ static int lowpan_frag_queue(struct lowpan_frag_queue *fq, int res; res = lowpan_frag_reasm(fq, skb, prev_tail, ldev, refs); - skb_dstref_restore(skb, dstref); + skb_dstref_set(skb, dstref); return res; } skb_dst_drop(skb); diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 6b19a0ffea21..bb6c0128a66b 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -553,7 +553,7 @@ static struct rtable *icmp_route_lookup(struct net *net, struct flowi4 *fl4, rt2 = skb_rtable(skb_in); /* steal dst entry from skb_in, don't drop refcnt */ skb_dstref_steal(skb_in); - skb_dstref_restore(skb_in, dstref); + skb_dstref_set(skb_in, dstref); } if (err) diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 33080c5350ed..a077070240b8 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -368,7 +368,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb, int *refs) dstref_t dstref = skb_dstref_steal(skb); err = ip_frag_reasm(qp, skb, prev_tail, dev, refs); - skb_dstref_restore(skb, dstref); + skb_dstref_set(skb, dstref); if (err) inet_frag_kill(&qp->q, refs); return err; diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index d6c712269052..9e247ec9aa97 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -621,7 +621,7 @@ int ip_options_rcv_srr(struct sk_buff *skb, struct net_device *dev) rt2 = skb_rtable(skb); if (err || (rt2->rt_type != RTN_UNICAST && rt2->rt_type != RTN_LOCAL)) { skb_dst_drop(skb); - skb_dstref_restore(skb, dstref); + skb_dstref_set(skb, dstref); return -EINVAL; } dstref_drop(dstref); diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 9fab51fb9497..c03ede44cfc7 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -289,7 +289,7 @@ static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb, dstref_t dstref = skb_dstref_steal(skb); err = nf_ct_frag6_reasm(fq, skb, prev, dev, refs); - skb_dstref_restore(skb, dstref); + skb_dstref_set(skb, dstref); /* After queue has assumed skb ownership, only 0 or * -EINPROGRESS must be returned. diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index aa8427f56ff3..016ca7344427 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -221,7 +221,7 @@ static int ip6_frag_queue(struct net *net, dstref_t dstref = skb_dstref_steal(skb); err = ip6_frag_reasm(fq, skb, prev_tail, dev, refs); - skb_dstref_restore(skb, dstref); + skb_dstref_set(skb, dstref); return err; } -- 2.51.0