projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8173be
)
ceph: use bvec_set_page to initialize a bvec
author
Christoph Hellwig
<hch@lst.de>
Fri, 3 Feb 2023 15:06:23 +0000
(16:06 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 3 Feb 2023 17:17:33 +0000
(10:17 -0700)
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link:
https://lore.kernel.org/r/20230203150634.3199647-13-hch@lst.de
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/ceph/file.c
patch
|
blob
|
history
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index
764598e
..
90b2aa7
100644
(file)
--- a/
fs/ceph/file.c
+++ b/
fs/ceph/file.c
@@
-103,14
+103,10
@@
static ssize_t __iter_get_bvecs(struct iov_iter *iter, size_t maxsize,
size += bytes;
for ( ; bytes; idx++, bvec_idx++) {
- struct bio_vec bv = {
- .bv_page = pages[idx],
- .bv_len = min_t(int, bytes, PAGE_SIZE - start),
- .bv_offset = start,
- };
-
- bvecs[bvec_idx] = bv;
- bytes -= bv.bv_len;
+ int len = min_t(int, bytes, PAGE_SIZE - start);
+
+ bvec_set_page(&bvecs[bvec_idx], pages[idx], len, start);
+ bytes -= len;
start = 0;
}
}