iov_iter: fix iov_iter_type
authorMing Lei <ming.lei@redhat.com>
Fri, 26 Apr 2019 10:45:21 +0000 (18:45 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 May 2019 14:38:47 +0000 (08:38 -0600)
commitf5eb4d3b92a6a1096ef3480b54782a9409281300
treef80fdd5c8e5a2b9dc12e9027186b75236ccfc971
parent60a27b906d1a372474669c914c10d6c993858a4a
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>
include/linux/uio.h