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.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 2d654c1c794d..43054285f638 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -147,18 +147,13 @@ static void wait_current_trans(struct btrfs_root *root)
147 while (1) { 147 while (1) {
148 prepare_to_wait(&root->fs_info->transaction_wait, &wait, 148 prepare_to_wait(&root->fs_info->transaction_wait, &wait,
149 TASK_UNINTERRUPTIBLE); 149 TASK_UNINTERRUPTIBLE);
150 if (cur_trans->blocked) { 150 if (!cur_trans->blocked)
151 mutex_unlock(&root->fs_info->trans_mutex);
152 schedule();
153 mutex_lock(&root->fs_info->trans_mutex);
154 finish_wait(&root->fs_info->transaction_wait,
155 &wait);
156 } else {
157 finish_wait(&root->fs_info->transaction_wait,
158 &wait);
159 break; 151 break;
160 } 152 mutex_unlock(&root->fs_info->trans_mutex);
153 schedule();
154 mutex_lock(&root->fs_info->trans_mutex);
161 } 155 }
156 finish_wait(&root->fs_info->transaction_wait, &wait);
162 put_transaction(cur_trans); 157 put_transaction(cur_trans);
163 } 158 }
164} 159}