diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-26 09:49:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-29 11:47:32 -0400 |
commit | b620743077e291ae7d0debd21f50413a8c266229 (patch) | |
tree | 965cefe7b283e821cc9f288e9ded8ba0778f6a60 /include/linux/uio.h | |
parent | d7c8aa85ed204ccebf0c18f29b941d52b33deae3 (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.h | 10 |
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 { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | enum iter_type { | 21 | enum iter_type { |
22 | /* set if ITER_BVEC doesn't hold a bv_page ref */ | ||
23 | ITER_BVEC_FLAG_NO_REF = 2, | ||
24 | |||
25 | /* iter types */ | 22 | /* iter types */ |
26 | ITER_IOVEC = 4, | 23 | ITER_IOVEC = 4, |
27 | ITER_KVEC = 8, | 24 | ITER_KVEC = 8, |
@@ -56,7 +53,7 @@ struct iov_iter { | |||
56 | 53 | ||
57 | static inline enum iter_type iov_iter_type(const struct iov_iter *i) | 54 | static inline enum iter_type iov_iter_type(const struct iov_iter *i) |
58 | { | 55 | { |
59 | return i->type & ~(READ | WRITE | ITER_BVEC_FLAG_NO_REF); | 56 | return i->type & ~(READ | WRITE); |
60 | } | 57 | } |
61 | 58 | ||
62 | static inline bool iter_is_iovec(const struct iov_iter *i) | 59 | 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) | |||
89 | return i->type & (READ | WRITE); | 86 | return i->type & (READ | WRITE); |
90 | } | 87 | } |
91 | 88 | ||
92 | static inline bool iov_iter_bvec_no_ref(const struct iov_iter *i) | ||
93 | { | ||
94 | return (i->type & ITER_BVEC_FLAG_NO_REF) != 0; | ||
95 | } | ||
96 | |||
97 | /* | 89 | /* |
98 | * Total number of bytes covered by an iovec. | 90 | * Total number of bytes covered by an iovec. |
99 | * | 91 | * |