summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_alua.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-01 18:39:14 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-05 02:05:15 +0300
commite13ec939e96b13e664bb6cee361cc976a0ee621a (patch)
tree9537ad39e7cc842c1f6d756aba43b1f753be9eaa /drivers/target/target_core_alua.c
parentbdd1d2d3d251c65b74ac4493e08db18971c09240 (diff)
downloadlinux-e13ec939e96b13e664bb6cee361cc976a0ee621a.tar.xz
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_alua.c')
-rw-r--r--drivers/target/target_core_alua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index a91b7c25ffd4..928127642574 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -896,13 +896,14 @@ static int core_alua_write_tpg_metadata(
u32 md_buf_len)
{
struct file *file = filp_open(path, O_RDWR | O_CREAT | O_TRUNC, 0600);
+ loff_t pos = 0;
int ret;
if (IS_ERR(file)) {
pr_err("filp_open(%s) for ALUA metadata failed\n", path);
return -ENODEV;
}
- ret = kernel_write(file, md_buf, md_buf_len, 0);
+ ret = kernel_write(file, md_buf, md_buf_len, &pos);
if (ret < 0)
pr_err("Error writing ALUA metadata file: %s\n", path);
fput(file);