提交 6b1dba3d 编写于 作者: P Pavel Begunkov 提交者: Martin K. Petersen

scsi: target: file: Don't zero iter before iov_iter_bvec

iov_iter_bvec() initialises iterators well, no need to pre-zero it
beforehand as done in fd_execute_rw_aio(). Compilers can't optimise it out
and generate extra code for that (confirmed with assembly).

Link: https://lore.kernel.org/r/34cd22d6cec046e3adf402accb1453cc255b9042.1610207523.git.asml.silence@gmail.comReviewed-by: NBart Van Assche <bvanassche@acm.org>
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 4f608fbc
......@@ -266,7 +266,7 @@ fd_execute_rw_aio(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
struct fd_dev *fd_dev = FD_DEV(dev);
struct file *file = fd_dev->fd_file;
struct target_core_file_cmd *aio_cmd;
struct iov_iter iter = {};
struct iov_iter iter;
struct scatterlist *sg;
struct bio_vec *bvec;
ssize_t len = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册