Btrfs: wait for the ordered extent only when we want

Signed-off-by: Miao Xie <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
This commit is contained in:
Miao Xie 2013-11-04 23:13:21 +08:00 • committed by Chris Mason
commit 38c135af8e

View file

@ -4047,7 +4047,8 @@ static void shrink_delalloc(struct btrfs_root *root, u64 to_reclaim, u64 orig,
if (delalloc_bytes == 0) {
if (trans)
return;
btrfs_wait_all_ordered_extents(root->fs_info);
if (wait_ordered)
btrfs_wait_all_ordered_extents(root->fs_info);
return;
}