diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-04-26 18:45:21 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-05-01 08:38:47 -0600 |
commit | f5eb4d3b92a6a1096ef3480b54782a9409281300 (patch) | |
tree | f80fdd5c8e5a2b9dc12e9027186b75236ccfc971 /include | |
parent | 60a27b906d1a372474669c914c10d6c993858a4a (diff) | |
download | linux-f5eb4d3b92a6a1096ef3480b54782a9409281300.tar.bz2 |
iov_iter: fix iov_iter_type
Commit 875f1d0769cd ("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: 875f1d0769cd ("iov_iter: add ITER_BVEC_FLAG_NO_REF flag")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/uio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index f184af1999a8..2d0131ad4604 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -60,7 +60,7 @@ struct iov_iter { static inline enum iter_type iov_iter_type(const struct iov_iter *i) { - return i->type & ~(READ | WRITE); + return i->type & ~(READ | WRITE | ITER_BVEC_FLAG_NO_REF); } static inline bool iter_is_iovec(const struct iov_iter *i) |