@@ -883,14 +883,13 @@ 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, &pos);
+ ret = kernel_write(file, md_buf, md_buf_len, NULL);
if (ret < 0)
pr_err("Error writing ALUA metadata file: %s\n", path);
fput(file);
@@ -1976,7 +1976,6 @@ static int __core_scsi3_write_aptpl_to_file(
char *path;
u32 pr_aptpl_buf_len;
int ret;
- loff_t pos = 0;
path = kasprintf(GFP_KERNEL, "%s/pr/aptpl_%s", db_root,
&wwn->unit_serial[0]);
@@ -1993,7 +1992,7 @@ static int __core_scsi3_write_aptpl_to_file(
pr_aptpl_buf_len = (strlen(buf) + 1); /* Add extra for NULL */
- ret = kernel_write(file, buf, pr_aptpl_buf_len, &pos);
+ ret = kernel_write(file, buf, pr_aptpl_buf_len, NULL);
if (ret < 0)
pr_debug("Error writing APTPL metadata file: %s\n", path);
We want to start at 0 and do not care about the updated value. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- drivers/target/target_core_alua.c | 3 +-- drivers/target/target_core_pr.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)