Skip to content
Snippets Groups Projects
Commit 34b0fab7 authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman
Browse files

fix iov_iter_bvec() "direction" argument


[ Upstream commit b676668d ]

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 50b70599
No related branches found
No related tags found
No related merge requests found
......@@ -340,7 +340,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
......@@ -477,7 +477,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment