diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-07 09:42:36 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-07 09:42:36 +0300 |
commit | e82051193a171f393d2a165a7ce18d8a2e2b4837 (patch) | |
tree | afb78295d4390ae7034f86589f0fd980dfb74d3e /include/net | |
parent | 39cd87c4eb2b893354f3b850f916353f2658ae6f (diff) | |
download | linux-e82051193a171f393d2a165a7ce18d8a2e2b4837.tar.xz |
new helper: copy_to_iter_full()
... and convert copy_linear_skb() to using that.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/udp.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/net/udp.h b/include/net/udp.h index 488a6d2babcc..c4e05b14b648 100644 --- a/include/net/udp.h +++ b/include/net/udp.h @@ -379,14 +379,7 @@ static inline bool udp_skb_is_linear(struct sk_buff *skb) static inline int copy_linear_skb(struct sk_buff *skb, int len, int off, struct iov_iter *to) { - int n; - - n = copy_to_iter(skb->data + off, len, to); - if (n == len) - return 0; - - iov_iter_revert(to, n); - return -EFAULT; + return copy_to_iter_full(skb->data + off, len, to) ? 0 : -EFAULT; } /* |