aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2024-05-13 12:23:17 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2024-05-13 12:23:17 -0700
commitf4e8d80292859809ea135e9f4c43bae47e4f58bc (patch)
treedcf96c36c22e526b3ae9898e65429cb8f6a551fe /include/net
parentMerge tag 'vfs-6.10.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/v... (diff)
parentMerge branch 'read_iter' of git://git.kernel.dk/linux (diff)
downloadlinux-f4e8d80292859809ea135e9f4c43bae47e4f58bc.tar.gz
linux-f4e8d80292859809ea135e9f4c43bae47e4f58bc.tar.bz2
linux-f4e8d80292859809ea135e9f4c43bae47e4f58bc.zip
Merge tag 'vfs-6.10.rw' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs rw iterator updates from Christian Brauner: "The core fs signalfd, userfaultfd, and timerfd subsystems did still use f_op->read() instead of f_op->read_iter(). Convert them over since we should aim to get rid of f_op->read() at some point. Aside from that io_uring and others want to mark files as FMODE_NOWAIT so it can make use of per-IO nonblocking hints to enable more efficient IO. Converting those users to f_op->read_iter() allows them to be marked with FMODE_NOWAIT" * tag 'vfs-6.10.rw' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: signalfd: convert to ->read_iter() userfaultfd: convert to ->read_iter() timerfd: convert to ->read_iter() new helper: copy_to_iter_full()
Diffstat (limited to 'include/net')
-rw-r--r--include/net/udp.h9
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;
}
/*