diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-10 02:30:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 17:32:50 -0400 |
commit | 3320c60b3a26d05666285c55ab08ee043c017ba3 (patch) | |
tree | c845310a12f63dd709d7170f4f2e7806d41f3003 /fs/direct-io.c | |
parent | 71d8e532b1549a478e6a6a8a44f309d050294d00 (diff) |
dio: take updating ->result into do_direct_IO()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index adfa1fb33456..387d91989c45 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -1003,6 +1003,7 @@ do_holes: | |||
1003 | 1 << blkbits); | 1003 | 1 << blkbits); |
1004 | sdio->block_in_file++; | 1004 | sdio->block_in_file++; |
1005 | block_in_page++; | 1005 | block_in_page++; |
1006 | dio->result += 1 << blkbits; | ||
1006 | goto next_block; | 1007 | goto next_block; |
1007 | } | 1008 | } |
1008 | 1009 | ||
@@ -1044,6 +1045,7 @@ do_holes: | |||
1044 | sdio->block_in_file += this_chunk_blocks; | 1045 | sdio->block_in_file += this_chunk_blocks; |
1045 | block_in_page += this_chunk_blocks; | 1046 | block_in_page += this_chunk_blocks; |
1046 | sdio->blocks_available -= this_chunk_blocks; | 1047 | sdio->blocks_available -= this_chunk_blocks; |
1048 | dio->result += this_chunk_blocks << blkbits; | ||
1047 | next_block: | 1049 | next_block: |
1048 | BUG_ON(sdio->block_in_file > sdio->final_block_in_request); | 1050 | BUG_ON(sdio->block_in_file > sdio->final_block_in_request); |
1049 | if (sdio->block_in_file == sdio->final_block_in_request) | 1051 | if (sdio->block_in_file == sdio->final_block_in_request) |
@@ -1271,10 +1273,6 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | |||
1271 | 1273 | ||
1272 | retval = do_direct_IO(dio, &sdio, &map_bh); | 1274 | retval = do_direct_IO(dio, &sdio, &map_bh); |
1273 | 1275 | ||
1274 | dio->result += iter->iov[seg].iov_len - | ||
1275 | ((sdio.final_block_in_request - sdio.block_in_file) << | ||
1276 | blkbits); | ||
1277 | |||
1278 | if (retval) { | 1276 | if (retval) { |
1279 | dio_cleanup(dio, &sdio); | 1277 | dio_cleanup(dio, &sdio); |
1280 | break; | 1278 | break; |