[PATCH net] inet: frags: remove redundant assignment in inet_frag_reasm_prepare()

yuan.gao posted 1 patch 4 days, 22 hours ago
net/ipv4/inet_fragment.c | 2 --
1 file changed, 2 deletions(-)
[PATCH net] inet: frags: remove redundant assignment in inet_frag_reasm_prepare()
Posted by yuan.gao 4 days, 22 hours ago
The assignment is redundant because skb_clone() already copies skb->cb.

Remove the unnecessary code.

Signed-off-by: yuan.gao <yuan.gao@ucloud.cn>
---
 net/ipv4/inet_fragment.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 496308c02..6119b660a 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -473,7 +473,6 @@ void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
 			head = skb;
 			goto out_restore_sk;
 		}
-		FRAG_CB(fp)->next_frag = FRAG_CB(skb)->next_frag;
 		if (RB_EMPTY_NODE(&skb->rbnode))
 			FRAG_CB(parent)->next_frag = fp;
 		else
@@ -488,7 +487,6 @@ void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
 			skb->destructor = NULL;
 		}
 		skb_morph(skb, head);
-		FRAG_CB(skb)->next_frag = FRAG_CB(head)->next_frag;
 		rb_replace_node(&head->rbnode, &skb->rbnode,
 				&q->rb_fragments);
 		consume_skb(head);
-- 
2.32.0
Re: [PATCH net] inet: frags: remove redundant assignment in inet_frag_reasm_prepare()
Posted by Eric Dumazet 4 days, 22 hours ago
On Tue, Jun 2, 2026 at 11:54 PM yuan.gao <yuan.gao@ucloud.cn> wrote:
>
> The assignment is redundant because skb_clone() already copies skb->cb.
>
> Remove the unnecessary code.
>

This looks like a net-next candidate to me.