summaryrefslogtreecommitdiff
path: root/net/sunrpc/xdr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-03 18:06:32 +0300
committerJens Axboe <axboe@kernel.dk>2023-02-03 20:17:42 +0300
commit9088151f1bfe670ae9e28b77095f974196bb2343 (patch)
treebc65c60cf978459d616ad2052813ae213b1f206e /net/sunrpc/xdr.c
parentefde918ac66958c568926120841e7692b1e9bd9d (diff)
downloadlinux-9088151f1bfe670ae9e28b77095f974196bb2343.tar.xz
sunrpc: 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: Chuck Lever <chuck.lever@oracle.com> Acked-by: Trond Myklebust <trond.myklebust@hammerspace.com> Link: https://lore.kernel.org/r/20230203150634.3199647-22-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r--net/sunrpc/xdr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index f7767bf22406..afe7ec02d232 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -150,9 +150,8 @@ xdr_alloc_bvec(struct xdr_buf *buf, gfp_t gfp)
if (!buf->bvec)
return -ENOMEM;
for (i = 0; i < n; i++) {
- buf->bvec[i].bv_page = buf->pages[i];
- buf->bvec[i].bv_len = PAGE_SIZE;
- buf->bvec[i].bv_offset = 0;
+ bvec_set_page(&buf->bvec[i], buf->pages[i], PAGE_SIZE,
+ 0);
}
}
return 0;