Commit 664e4078 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

splice: use bvec_set_page to initialize a bvec

Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230203150634.3199647-18-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8ead80b2
...@@ -675,9 +675,8 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, ...@@ -675,9 +675,8 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
goto done; goto done;
} }
array[n].bv_page = buf->page; bvec_set_page(&array[n], buf->page, this_len,
array[n].bv_len = this_len; buf->offset);
array[n].bv_offset = buf->offset;
left -= this_len; left -= this_len;
n++; n++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment