diff options
| author | David S. Miller <davem@davemloft.net> | 2017-08-09 16:49:17 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-08-09 16:49:17 -0700 |
| commit | 0bdf7101c69cd2a026907d2f7219a772c860e363 (patch) | |
| tree | 49f558c2efc24570bee03923b0f8c91d9fc4609f /include | |
| parent | d5e7f827a6a20ca0c3545591dae7d24b2ccf1e70 (diff) | |
| parent | 0a4a060bb204c47825eb4f7c27f66fc7ee85d508 (diff) | |
Merge branch 'net-zerocopy-fixes'
Willem de Bruijn says:
====================
net: zerocopy fixes
Fix two issues introduced in the msg_zerocopy patchset.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/skbuff.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 8c0708d2e5e6..7594e19bce62 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1273,8 +1273,13 @@ static inline void skb_zcopy_clear(struct sk_buff *skb, bool zerocopy) struct ubuf_info *uarg = skb_zcopy(skb); if (uarg) { - uarg->zerocopy = uarg->zerocopy && zerocopy; - sock_zerocopy_put(uarg); + if (uarg->callback == sock_zerocopy_callback) { + uarg->zerocopy = uarg->zerocopy && zerocopy; + sock_zerocopy_put(uarg); + } else { + uarg->callback(uarg, zerocopy); + } + skb_shinfo(skb)->tx_flags &= ~SKBTX_ZEROCOPY_FRAG; } } |
