path: root/drivers/target/target_core_file.c
diff options
authorChristoph Hellwig <hch@lst.de>2017-09-01 17:39:14 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-04 19:05:15 -0400
commite13ec939e96b13e664bb6cee361cc976a0ee621a (patch)
tree9537ad39e7cc842c1f6d756aba43b1f753be9eaa /drivers/target/target_core_file.c
parentbdd1d2d3d251c65b74ac4493e08db18971c09240 (diff)
fs: fix kernel_write prototype
Make the position an in/out argument like all the other read/write helpers and and make the buf argument a void pointer. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/target/target_core_file.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index 24cf11d9e50a..c629817a8854 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -443,7 +443,7 @@ fd_do_prot_fill(struct se_device *se_dev, sector_t lba, sector_t nolb,
for (prot = 0; prot < prot_length;) {
sector_t len = min_t(sector_t, bufsize, prot_length - prot);
- ssize_t ret = kernel_write(prot_fd, buf, len, pos + prot);
+ ssize_t ret = kernel_write(prot_fd, buf, len, &pos);
if (ret != len) {
pr_err("vfs_write to prot file failed: %zd\n", ret);

Privacy Policy