aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/uio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r--include/linux/uio.h6
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
85static inline void iov_iter_truncate(struct iov_iter *i, size_t count)
86{
87 if (i->count > count)
88 i->count = count;
89}
90
85int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); 91int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
86int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); 92int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
87 93