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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 15f11fb9fff6..8b01e1c3c614 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -112,6 +112,14 @@ static inline bool iter_is_iovec(struct iov_iter *i)
112} 112}
113 113
114/* 114/*
115 * Get one of READ or WRITE out of iter->type without any other flags OR'd in
116 * with it.
117 *
118 * The ?: is just for type safety.
119 */
120#define iov_iter_rw(i) ((0 ? (struct iov_iter *)0 : (i))->type & RW_MASK)
121
122/*
115 * Cap the iov_iter by given limit; note that the second argument is 123 * Cap the iov_iter by given limit; note that the second argument is
116 * *not* the new size - it's upper limit for such. Passing it a value 124 * *not* the new size - it's upper limit for such. Passing it a value
117 * greater than the amount of data in iov_iter is fine - it'll just do 125 * greater than the amount of data in iov_iter is fine - it'll just do