aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 87456ab74275..67e4aca36a62 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -443,8 +443,7 @@ static int drop_dirty_roots(struct btrfs_root *tree_root,
443 BUG_ON(ret); 443 BUG_ON(ret);
444 mutex_unlock(&tree_root->fs_info->fs_mutex); 444 mutex_unlock(&tree_root->fs_info->fs_mutex);
445 btrfs_btree_balance_dirty(tree_root, nr); 445 btrfs_btree_balance_dirty(tree_root, nr);
446 schedule(); 446 cond_resched();
447
448 mutex_lock(&tree_root->fs_info->fs_mutex); 447 mutex_lock(&tree_root->fs_info->fs_mutex);
449 } 448 }
450 BUG_ON(ret); 449 BUG_ON(ret);
@@ -471,7 +470,7 @@ static int drop_dirty_roots(struct btrfs_root *tree_root,
471 mutex_unlock(&tree_root->fs_info->fs_mutex); 470 mutex_unlock(&tree_root->fs_info->fs_mutex);
472 471
473 btrfs_btree_balance_dirty(tree_root, nr); 472 btrfs_btree_balance_dirty(tree_root, nr);
474 schedule(); 473 cond_resched();
475 } 474 }
476 return ret; 475 return ret;
477} 476}