Skip to content

Commit

Permalink
Btrfs: unlock the trans lock properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Josef Bacik committed Jun 9, 2011
1 parent 25b8b93 commit 3473f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid)
list) {
if (t->in_commit) {
if (t->commit_done)
goto out;
break;
cur_trans = t;
atomic_inc(&cur_trans->use_count);
break;
Expand Down

0 comments on commit 3473f3c

Please sign in to comment.