From abbb65899aecfc97bda64b6816d1e501754cfe1f Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 27 May 2017 11:16:52 +0300 Subject: fs: implement vfs_iter_write using do_iter_write De-dupliate some code and allow for passing the flags argument to vfs_iter_write. Additionally it now properly updates timestamps. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro --- drivers/target/target_core_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/target') diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 2befc0d7fdb1..e921948415c7 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -273,7 +273,7 @@ static int fd_do_rw(struct se_cmd *cmd, struct file *fd, iov_iter_bvec(&iter, ITER_BVEC, bvec, sgl_nents, len); if (is_write) - ret = vfs_iter_write(fd, &iter, &pos); + ret = vfs_iter_write(fd, &iter, &pos, 0); else ret = vfs_iter_read(fd, &iter, &pos, 0); @@ -409,7 +409,7 @@ fd_execute_write_same(struct se_cmd *cmd) } iov_iter_bvec(&iter, ITER_BVEC, bvec, nolb, len); - ret = vfs_iter_write(fd_dev->fd_file, &iter, &pos); + ret = vfs_iter_write(fd_dev->fd_file, &iter, &pos, 0); kfree(bvec); if (ret < 0 || ret != len) { -- cgit v1.2.3