summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-03 16:06:31 +0100
committerJens Axboe <axboe@kernel.dk>2023-02-03 18:17:42 +0100
commitefde918ac66958c568926120841e7692b1e9bd9d (patch)
tree7e84c7ab83d9f2de4f3bf202cff99878c47315c3 /net
parentswap: use bvec_set_page to initialize bvecs (diff)
downloadlinux-efde918ac66958c568926120841e7692b1e9bd9d.tar.xz
linux-efde918ac66958c568926120841e7692b1e9bd9d.zip
rxrpc: use bvec_set_page to initialize a bvec
Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: David Howells <dhowells@redhat.com> Link: https://lore.kernel.org/r/20230203150634.3199647-21-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net')
-rw-r--r--net/rxrpc/rxperf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/rxrpc/rxperf.c b/net/rxrpc/rxperf.c
index 16dcabb71ebe..4a2e90015ca7 100644
--- a/net/rxrpc/rxperf.c
+++ b/net/rxrpc/rxperf.c
@@ -493,7 +493,7 @@ static int rxperf_deliver_request(struct rxperf_call *call)
static int rxperf_process_call(struct rxperf_call *call)
{
struct msghdr msg = {};
- struct bio_vec bv[1];
+ struct bio_vec bv;
struct kvec iov[1];
ssize_t n;
size_t reply_len = call->reply_len, len;
@@ -503,10 +503,8 @@ static int rxperf_process_call(struct rxperf_call *call)
while (reply_len > 0) {
len = min_t(size_t, reply_len, PAGE_SIZE);
- bv[0].bv_page = ZERO_PAGE(0);
- bv[0].bv_offset = 0;
- bv[0].bv_len = len;
- iov_iter_bvec(&msg.msg_iter, WRITE, bv, 1, len);
+ bvec_set_page(&bv, ZERO_PAGE(0), len, 0);
+ iov_iter_bvec(&msg.msg_iter, WRITE, &bv, 1, len);
msg.msg_flags = MSG_MORE;
n = rxrpc_kernel_send_data(rxperf_socket, call->rxcall, &msg,
len, rxperf_notify_end_reply_tx);