diff options
author | Jonathan Lemon <jonathan.lemon@gmail.com> | 2021-01-06 23:18:35 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-08 01:06:37 +0100 |
commit | 236a6b1cd585a408139550201343f3f16f9324b9 (patch) | |
tree | 08c7270f5e085ddc04a2b6adb4342cbfc70e09dd /net/ipv4/ip_output.c | |
parent | skbuff: Add skb parameter to the ubuf zerocopy callback (diff) | |
download | linux-236a6b1cd585a408139550201343f3f16f9324b9.tar.xz linux-236a6b1cd585a408139550201343f3f16f9324b9.zip |
skbuff: Call sock_zerocopy_put_abort from skb_zcopy_put_abort
The sock_zerocopy_put_abort function contains logic which is
specific to the current zerocopy implementation. Add a wrapper
which checks the callback and dispatches apppropriately.
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 89fff5f59eea..bae9b29e17a3 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1230,8 +1230,7 @@ alloc_new_skb: error_efault: err = -EFAULT; error: - if (uarg) - sock_zerocopy_put_abort(uarg, extra_uref); + skb_zcopy_put_abort(uarg, extra_uref); cork->length -= length; IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTDISCARDS); refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc); |