From: Christoph Hellwig Date: Fri, 3 Feb 2023 15:06:28 +0000 (+0100) Subject: splice: use bvec_set_page to initialize a bvec X-Git-Tag: v6.6.7~3351^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=664e40789abaad892737a696102052dae199a029;p=platform%2Fkernel%2Flinux-starfive.git splice: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230203150634.3199647-18-hch@lst.de Signed-off-by: Jens Axboe --- diff --git a/fs/splice.c b/fs/splice.c index 5969b7a..87d9b19 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -675,9 +675,8 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, goto done; } - array[n].bv_page = buf->page; - array[n].bv_len = this_len; - array[n].bv_offset = buf->offset; + bvec_set_page(&array[n], buf->page, this_len, + buf->offset); left -= this_len; n++; }