diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-09-16 02:04:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-09 13:28:03 +0300 |
commit | 02f719be2f2b10b5a952a36dc230ea40fa37afb9 (patch) | |
tree | d925c7458a10955c3ae270bc562615bf57b2e8f9 /drivers | |
parent | b50705b5ef09c9683eb88d6583e6b49f5ac21219 (diff) | |
download | linux-02f719be2f2b10b5a952a36dc230ea40fa37afb9.tar.xz |
fix iov_iter_bvec() "direction" argument
[ Upstream commit b676668d99155e6859d99bbf2df18b3f03851902 ]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Stable-dep-of: 6dd88fd59da8 ("vhost-scsi: unbreak any layout for response")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/target_core_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 28aa643be5d5..55935040541b 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -337,7 +337,7 @@ static int fd_do_rw(struct se_cmd *cmd, struct file *fd, len += sg->length; } - iov_iter_bvec(&iter, READ, bvec, sgl_nents, len); + iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len); if (is_write) ret = vfs_iter_write(fd, &iter, &pos, 0); else @@ -473,7 +473,7 @@ fd_execute_write_same(struct se_cmd *cmd) len += se_dev->dev_attrib.block_size; } - iov_iter_bvec(&iter, READ, bvec, nolb, len); + iov_iter_bvec(&iter, WRITE, bvec, nolb, len); ret = vfs_iter_write(fd_dev->fd_file, &iter, &pos, 0); kfree(bvec); |