projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45a3fb9
)
fs/buffer.c: use bvec iterator to truncate the bio
author
Ming Lei
<
[email protected]
>
Fri, 15 Feb 2019 11:13:15 +0000
(19:13 +0800)
committer
Jens Axboe
<
[email protected]
>
Fri, 15 Feb 2019 15:40:11 +0000
(08:40 -0700)
Once multi-page bvec is enabled, the last bvec may include more than one
page, this patch use mp_bvec_last_segment() to truncate the bio.
Reviewed-by: Omar Sandoval <
[email protected]
>
Reviewed-by: Christoph Hellwig <
[email protected]
>
Signed-off-by: Ming Lei <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
fs/buffer.c
patch
|
blob
|
history
diff --git
a/fs/buffer.c
b/fs/buffer.c
index 52d024bfdbc12142a97ff8ec204ce4b658df6fe6..817871274c77682d180261bcdffcd0e76ab7dcb6 100644
(file)
--- a/
fs/buffer.c
+++ b/
fs/buffer.c
@@
-3032,7
+3032,10
@@
void guard_bio_eod(int op, struct bio *bio)
/* ..and clear the end of the buffer for reads */
if (op == REQ_OP_READ) {
- zero_user(bvec->bv_page, bvec->bv_offset + bvec->bv_len,
+ struct bio_vec bv;
+
+ mp_bvec_last_segment(bvec, &bv);
+ zero_user(bv.bv_page, bv.bv_offset + bv.bv_len,
truncated_bytes);
}
}