summaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-11-02 05:42:45 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2016-12-05 22:34:30 +0300
commit15e6cb46c9b09711d1224ae5418b53140e1ba444 (patch)
tree752327459c25e4d36f8523c571384857ec64a39f /include/linux/skbuff.h
parentcbbd26b8b1a6af9c02e2b6523e12bd50cc765059 (diff)
downloadlinux-15e6cb46c9b09711d1224ae5418b53140e1ba444.tar.xz
make skb_add_data,{_nocache}() and skb_copy_to_page_nocache() advance only on success
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 32810f279f8e..9cfae2e73b3c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2809,12 +2809,12 @@ static inline int skb_add_data(struct sk_buff *skb,
if (skb->ip_summed == CHECKSUM_NONE) {
__wsum csum = 0;
- if (csum_and_copy_from_iter(skb_put(skb, copy), copy,
- &csum, from) == copy) {
+ if (csum_and_copy_from_iter_full(skb_put(skb, copy), copy,
+ &csum, from)) {
skb->csum = csum_block_add(skb->csum, csum, off);
return 0;
}
- } else if (copy_from_iter(skb_put(skb, copy), copy, from) == copy)
+ } else if (copy_from_iter_full(skb_put(skb, copy), copy, from))
return 0;
__skb_trim(skb, off);