summaryrefslogtreecommitdiff
path: root/include/net/ipv6_frag.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-03-12 08:22:47 +0000
committerPaolo Abeni <pabeni@redhat.com>2025-03-18 13:18:36 +0100
commitae2d90355aa5592b0e99c8bbb4c3fa1d8e205f1b (patch)
tree9cba351968ad775449b48104114ea678c7cf9849 /include/net/ipv6_frag.h
parent24faa63bcea88b6f24b0a3a710708505a876f9ba (diff)
inet: frags: add inet_frag_putn() helper
inet_frag_putn() can release multiple references in one step. Use it in inet_frags_free_cb(). Replace inet_frag_put(X) with inet_frag_putn(X, 1) Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250312082250.1803501-2-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/ipv6_frag.h')
-rw-r--r--include/net/ipv6_frag.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ipv6_frag.h b/include/net/ipv6_frag.h
index 7321ffe3a108..9d968d7d9fa4 100644
--- a/include/net/ipv6_frag.h
+++ b/include/net/ipv6_frag.h
@@ -66,6 +66,7 @@ ip6frag_expire_frag_queue(struct net *net, struct frag_queue *fq)
{
struct net_device *dev = NULL;
struct sk_buff *head;
+ int refs = 1;
rcu_read_lock();
/* Paired with the WRITE_ONCE() in fqdir_pre_exit(). */
@@ -109,7 +110,7 @@ out:
spin_unlock(&fq->q.lock);
out_rcu_unlock:
rcu_read_unlock();
- inet_frag_put(&fq->q);
+ inet_frag_putn(&fq->q, refs);
}
/* Check if the upper layer header is truncated in the first fragment. */