diff options
| author | Mark Brown <broonie@kernel.org> | 2019-06-26 14:39:34 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2019-06-26 14:39:34 +0300 |
| commit | 53c8b29abe42e5601cfa0ea5962532f0cfdec8a0 (patch) | |
| tree | cad53f42ce7a03c39a984bcdbcc42cd47f1af6f9 /include/linux/skbuff.h | |
| parent | e3303268f9cfa4eb7c2217df471417d4327109fd (diff) | |
| parent | 4b972a01a7da614b4796475f933094751a295a2f (diff) | |
| download | linux-53c8b29abe42e5601cfa0ea5962532f0cfdec8a0.tar.xz | |
Merge tag 'v5.2-rc6' into asoc-5.3
Linux 5.2-rc6
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6d58fa8a65fd..056f557d5194 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1,14 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Definitions for the 'struct sk_buff' memory handlers. * * Authors: * Alan Cox, <gw4pts@gw4pts.ampr.org> * Florian La Roche, <rzsfl@rz.uni-sb.de> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. */ #ifndef _LINUX_SKBUFF_H @@ -1434,10 +1430,12 @@ static inline void skb_zcopy_clear(struct sk_buff *skb, bool zerocopy) struct ubuf_info *uarg = skb_zcopy(skb); if (uarg) { - if (uarg->callback == sock_zerocopy_callback) { + if (skb_zcopy_is_nouarg(skb)) { + /* no notification callback */ + } else if (uarg->callback == sock_zerocopy_callback) { uarg->zerocopy = uarg->zerocopy && zerocopy; sock_zerocopy_put(uarg); - } else if (!skb_zcopy_is_nouarg(skb)) { + } else { uarg->callback(uarg, zerocopy); } @@ -2691,7 +2689,8 @@ static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) { if (likely(!skb_zcopy(skb))) return 0; - if (skb_uarg(skb)->callback == sock_zerocopy_callback) + if (!skb_zcopy_is_nouarg(skb) && + skb_uarg(skb)->callback == sock_zerocopy_callback) return 0; return skb_copy_ubufs(skb, gfp_mask); } |
