diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-27 11:16:52 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-06-29 17:49:23 -0400 |
commit | abbb65899aecfc97bda64b6816d1e501754cfe1f (patch) | |
tree | 58b223fcbd886f93b75b98f3ac2807aa82e1c9e7 /drivers | |
parent | 18e9710ee59ce3bd2a2512ddcd3f7ceebe8b8d17 (diff) |
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 <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/loop.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_file.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index b64649bec64e..2a0d997efda4 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -266,7 +266,7 @@ static int lo_write_bvec(struct file *file, struct bio_vec *bvec, loff_t *ppos) iov_iter_bvec(&i, ITER_BVEC, bvec, 1, bvec->bv_len); file_start_write(file); - bw = vfs_iter_write(file, &i, ppos); + bw = vfs_iter_write(file, &i, ppos, 0); file_end_write(file); if (likely(bw == bvec->bv_len)) 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) { |