summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-03 18:06:24 +0300
committerJens Axboe <axboe@kernel.dk>2023-02-03 20:17:42 +0300
commit220ae4a5c2ba10333b3b01fbf3dea0d759e77a76 (patch)
tree4d51fccbd9acaba3c87ebde19daaf066dbb97ea6 /fs/cifs/connect.c
parent5c6542b6612f635eaa001c54af22018f1e996418 (diff)
downloadlinux-220ae4a5c2ba10333b3b01fbf3dea0d759e77a76.tar.xz
cifs: use bvec_set_page to initialize bvecs
Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Link: https://lore.kernel.org/r/20230203150634.3199647-14-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b2a04b4e89a5..e6088d96eb04 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -759,8 +759,9 @@ cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page,
unsigned int page_offset, unsigned int to_read)
{
struct msghdr smb_msg = {};
- struct bio_vec bv = {
- .bv_page = page, .bv_len = to_read, .bv_offset = page_offset};
+ struct bio_vec bv;
+
+ bvec_set_page(&bv, page, to_read, page_offset);
iov_iter_bvec(&smb_msg.msg_iter, ITER_DEST, &bv, 1, to_read);
return cifs_readv_from_socket(server, &smb_msg);
}