fs: implement vfs_iter_read using do_iter_read

De-dupliate some code and allow for passing the flags argument to
vfs_iter_read.  Additional it properly updates atime now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig
2017-05-27 11:16:51 +03:00
committed by Al Viro
parent edab5fe38c
commit 18e9710ee5
5 changed files with 15 additions and 25 deletions

View File

@@ -275,7 +275,7 @@ static int fd_do_rw(struct se_cmd *cmd, struct file *fd,
if (is_write)
ret = vfs_iter_write(fd, &iter, &pos);
else
ret = vfs_iter_read(fd, &iter, &pos);
ret = vfs_iter_read(fd, &iter, &pos, 0);
if (is_write) {
if (ret < 0 || ret != data_length) {