btrfs: account that we're waiting for DIO read
diff mbox

Message ID 20170719175632.1757-1-dsterba@suse.com
State New
Headers show

Commit Message

David Sterba July 19, 2017, 5:56 p.m. UTC
Correctly account for IO when waiting for a submitted DIO read, the case
when we're retrying.  This only for the accounting purposes and should
not change other behaviour.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index eb495e956d53..2fde93548298 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8105,7 +8105,7 @@  static int __btrfs_correct_data_nocsum(struct inode *inode,
 			goto next;
 		}
 
-		wait_for_completion(&done.done);
+		wait_for_completion_io(&done.done);
 
 		if (!done.uptodate) {
 			/* We might have another mirror, so try again */
@@ -8219,7 +8219,7 @@  static int __btrfs_subio_endio_read(struct inode *inode,
 			goto next;
 		}
 
-		wait_for_completion(&done.done);
+		wait_for_completion_io(&done.done);
 
 		if (!done.uptodate) {
 			/* We might have another mirror, so try again */