summaryrefslogtreecommitdiff
path: root/include/linux/uio.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-26 15:49:28 +0200
committerJens Axboe <axboe@kernel.dk>2019-06-29 09:47:32 -0600
commitb620743077e291ae7d0debd21f50413a8c266229 (patch)
tree965cefe7b283e821cc9f288e9ded8ba0778f6a60 /include/linux/uio.h
parentd7c8aa85ed204ccebf0c18f29b941d52b33deae3 (diff)
block: never take page references for ITER_BVEC
If we pass pages through an iov_iter we always already have a reference in the caller. Thus remove the ITER_BVEC_FLAG_NO_REF and don't take reference to pages by default for bvec backed iov_iters. Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r--include/linux/uio.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 2c90a0842ee8..cea1761c5672 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -19,9 +19,6 @@ struct kvec {
};
enum iter_type {
- /* set if ITER_BVEC doesn't hold a bv_page ref */
- ITER_BVEC_FLAG_NO_REF = 2,
-
/* iter types */
ITER_IOVEC = 4,
ITER_KVEC = 8,
@@ -56,7 +53,7 @@ struct iov_iter {
static inline enum iter_type iov_iter_type(const struct iov_iter *i)
{
- return i->type & ~(READ | WRITE | ITER_BVEC_FLAG_NO_REF);
+ return i->type & ~(READ | WRITE);
}
static inline bool iter_is_iovec(const struct iov_iter *i)
@@ -89,11 +86,6 @@ static inline unsigned char iov_iter_rw(const struct iov_iter *i)
return i->type & (READ | WRITE);
}
-static inline bool iov_iter_bvec_no_ref(const struct iov_iter *i)
-{
- return (i->type & ITER_BVEC_FLAG_NO_REF) != 0;
-}
-
/*
* Total number of bytes covered by an iovec.
*