diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-27 11:16:51 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-06-29 17:49:23 -0400 |
commit | 18e9710ee59ce3bd2a2512ddcd3f7ceebe8b8d17 (patch) | |
tree | a09b5ebcb9460ad374b798258b8f46dd370cad88 /drivers/block | |
parent | edab5fe38c2c17a7d7ea5f82e1d9503bfc79a8ac (diff) | |
download | linux-18e9710ee59ce3bd2a2512ddcd3f7ceebe8b8d17.tar.gz linux-18e9710ee59ce3bd2a2512ddcd3f7ceebe8b8d17.tar.bz2 linux-18e9710ee59ce3bd2a2512ddcd3f7ceebe8b8d17.zip |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/loop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index ebbd0c3fe0ed..b64649bec64e 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -342,7 +342,7 @@ static int lo_read_simple(struct loop_device *lo, struct request *rq, rq_for_each_segment(bvec, rq, iter) { iov_iter_bvec(&i, ITER_BVEC, &bvec, 1, bvec.bv_len); - len = vfs_iter_read(lo->lo_backing_file, &i, &pos); + len = vfs_iter_read(lo->lo_backing_file, &i, &pos, 0); if (len < 0) return len; @@ -383,7 +383,7 @@ static int lo_read_transfer(struct loop_device *lo, struct request *rq, b.bv_len = bvec.bv_len; iov_iter_bvec(&i, ITER_BVEC, &b, 1, b.bv_len); - len = vfs_iter_read(lo->lo_backing_file, &i, &pos); + len = vfs_iter_read(lo->lo_backing_file, &i, &pos, 0); if (len < 0) { ret = len; goto out_free_page; |