diff options
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r-- | include/linux/uio.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index 4876e9f2a58f..532f59d0adbb 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -82,6 +82,12 @@ static inline size_t iov_iter_count(struct iov_iter *i) | |||
82 | return i->count; | 82 | return i->count; |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void iov_iter_truncate(struct iov_iter *i, size_t count) | ||
86 | { | ||
87 | if (i->count > count) | ||
88 | i->count = count; | ||
89 | } | ||
90 | |||
85 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 91 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
86 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); | 92 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); |
87 | 93 | ||