diff options
author | Jonathan Lemon <jonathan.lemon@gmail.com> | 2021-01-06 23:18:30 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-08 01:06:37 +0100 |
commit | d6adf1b103bfe264a494c770f27fe985ab67202c (patch) | |
tree | b866eb1b4d3f006ab84c44565f0b7e7bd0df0786 /net/core/skbuff.c | |
parent | skbuff: remove unused skb_zcopy_abort function (diff) | |
download | linux-d6adf1b103bfe264a494c770f27fe985ab67202c.tar.xz linux-d6adf1b103bfe264a494c770f27fe985ab67202c.zip |
skbuff: simplify sock_zerocopy_put
All 'struct ubuf_info' users should have a callback defined
as of commit 0a4a060bb204 ("sock: fix zerocopy_success regression
with msg_zerocopy").
Remove the dead code path to consume_skb(), which makes
assumptions about how the structure was allocated.
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | net/core/skbuff.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f62cae3f75d8..d88963f47f7d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1245,12 +1245,8 @@ EXPORT_SYMBOL_GPL(sock_zerocopy_callback); void sock_zerocopy_put(struct ubuf_info *uarg) { - if (uarg && refcount_dec_and_test(&uarg->refcnt)) { - if (uarg->callback) - uarg->callback(uarg, uarg->zerocopy); - else - consume_skb(skb_from_uarg(uarg)); - } + if (uarg && refcount_dec_and_test(&uarg->refcnt)) + uarg->callback(uarg, uarg->zerocopy); } EXPORT_SYMBOL_GPL(sock_zerocopy_put); |