aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-06-09 10:15:17 -0400
committerJosef Bacik <josef@redhat.com>2011-06-09 10:15:17 -0400
commit3473f3c06a36865ae05993041fff35ee928342a7 (patch)
tree1f87d27e58a27ab525ac7579e6e1233052f8b573 /fs/btrfs
parent25b8b936ed44814a5ce6fc3b2a21401f33cd56f6 (diff)
Btrfs: unlock the trans lock properly
In btrfs_wait_for_commit if we came upon a transaction that had committed we just exited, but that's bad since we are holding the trans_lock. So break instead so that the lock is dropped. Thanks, Reported-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index dd719662340e..6b2e4786d189 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -349,7 +349,7 @@ int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid)
349 list) { 349 list) {
350 if (t->in_commit) { 350 if (t->in_commit) {
351 if (t->commit_done) 351 if (t->commit_done)
352 goto out; 352 break;
353 cur_trans = t; 353 cur_trans = t;
354 atomic_inc(&cur_trans->use_count); 354 atomic_inc(&cur_trans->use_count);
355 break; 355 break;