diff options
author | Pavel Begunkov | 2021-01-09 15:53:27 +0000 |
---|---|---|
committer | Martin K. Petersen | 2021-01-13 00:09:16 -0500 |
commit | 6b1dba3d8c85b6f60fece052cddc634fa103f2d1 (patch) | |
tree | e64e086394276bf01c1fd133c309c32f8d3f9265 /drivers/target | |
parent | 4f608fbce54bf9e0a42c0e8584e59034dbf12665 (diff) |
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.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index b0cb5b95e892..d1f887e3603f 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -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; |