Skip to content

Commit f5eb4d3

Browse files
Ming Leiaxboe
authored andcommitted
iov_iter: fix iov_iter_type
Commit 875f1d0 ("iov_iter: add ITER_BVEC_FLAG_NO_REF flag") introduces one extra flag of ITER_BVEC_FLAG_NO_REF, and this flag is stored into iter->type. However, iov_iter_type() doesn't consider the new added flag, fix it by masking this flag in iov_iter_type(). Fixes: 875f1d0 ("iov_iter: add ITER_BVEC_FLAG_NO_REF flag") Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 60a27b9 commit f5eb4d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/uio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct iov_iter {
6060

6161
static inline enum iter_type iov_iter_type(const struct iov_iter *i)
6262
{
63-
return i->type & ~(READ | WRITE);
63+
return i->type & ~(READ | WRITE | ITER_BVEC_FLAG_NO_REF);
6464
}
6565

6666
static inline bool iter_is_iovec(const struct iov_iter *i)

0 commit comments

Comments
 (0)