summaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-03-25 09:17:23 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-27 13:49:44 -0700
commit7b7ed885aff2eede24d641c3b042ebcf7517a5c5 (patch)
tree97c9dd78b5eeaf2b43636b3a1b9618e3400b407d /net/core/skbuff.c
parenta986967eb8e991481d688b74266d817e5341916a (diff)
downloadlinux-7b7ed885aff2eede24d641c3b042ebcf7517a5c5.tar.gz
linux-7b7ed885aff2eede24d641c3b042ebcf7517a5c5.tar.bz2
linux-7b7ed885aff2eede24d641c3b042ebcf7517a5c5.zip
net/core: Allow the compiler to verify declaration and definition consistency
Instead of declaring a function in a .c file, declare it in a header file and include that header file from the source files that define and that use the function. That allows the compiler to verify consistency of declaration and definition. See also commit 52267790ef52 ("sock: add MSG_ZEROCOPY") # v4.14. Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 2415d9cb9b89..4782f9354dd1 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -77,6 +77,8 @@
#include <linux/capability.h>
#include <linux/user_namespace.h>
+#include "datagram.h"
+
struct kmem_cache *skbuff_head_cache __ro_after_init;
static struct kmem_cache *skbuff_fclone_cache __ro_after_init;
#ifdef CONFIG_SKB_EXTENSIONS
@@ -1105,9 +1107,6 @@ void sock_zerocopy_put_abort(struct ubuf_info *uarg, bool have_uref)
}
EXPORT_SYMBOL_GPL(sock_zerocopy_put_abort);
-extern int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb,
- struct iov_iter *from, size_t length);
-
int skb_zerocopy_iter_dgram(struct sk_buff *skb, struct msghdr *msg, int len)
{
return __zerocopy_sg_from_iter(skb->sk, skb, &msg->msg_iter, len);