]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
inet: frags: remove redundant assignment in inet_frag_reasm_prepare()
authoryuan.gao <yuan.gao@ucloud.cn>
Wed, 3 Jun 2026 06:53:23 +0000 (14:53 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Jun 2026 01:26:11 +0000 (18:26 -0700)
The assignment is redundant because skb_clone() already copies skb->cb.

Remove the unnecessary code.

Signed-off-by: yuan.gao <yuan.gao@ucloud.cn>
Link: https://patch.msgid.link/20260603065323.2736839-1-yuan.gao@ucloud.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/inet_fragment.c

index 86b100694659ee51292625216113f9411b98a351..703c8dc4daad5d5da51c4feeed58cae4a4d0a0af 100644 (file)
@@ -519,7 +519,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
@@ -534,7 +533,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);