diff options
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index b561e7a4007d..b142b6dc96c3 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -3637,7 +3637,11 @@ again: | |||
3637 | * start over after this. | 3637 | * start over after this. |
3638 | */ | 3638 | */ |
3639 | 3639 | ||
3640 | wait_event(ordered->wait, ordered->csum_bytes_left == 0); | 3640 | if (ordered->csum_bytes_left) { |
3641 | btrfs_start_ordered_extent(inode, ordered, 0); | ||
3642 | wait_event(ordered->wait, | ||
3643 | ordered->csum_bytes_left == 0); | ||
3644 | } | ||
3641 | 3645 | ||
3642 | list_for_each_entry(sum, &ordered->list, list) { | 3646 | list_for_each_entry(sum, &ordered->list, list) { |
3643 | ret = btrfs_csum_file_blocks(trans, log, sum); | 3647 | ret = btrfs_csum_file_blocks(trans, log, sum); |