iov_iter: fix iov_iter_type
Commit875f1d0769
("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:875f1d0769
("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>
This commit is contained in:
@@ -60,7 +60,7 @@ struct iov_iter {
|
|||||||
|
|
||||||
static inline enum iter_type iov_iter_type(const struct iov_iter *i)
|
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)
|
static inline bool iter_is_iovec(const struct iov_iter *i)
|
||||||
|
Reference in New Issue
Block a user