From: Josef Bacik Date: Thu, 9 Jun 2011 14:15:17 +0000 (-0400) Subject: Btrfs: unlock the trans lock properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3473f3c06a36865ae05993041fff35ee928342a7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Josef Bacik --- 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) list) { if (t->in_commit) { if (t->commit_done) - goto out; + break; cur_trans = t; atomic_inc(&cur_trans->use_count); break;