diff --git a/[refs] b/[refs] index 13cdcd9acd1a..147a28a93852 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a65917156e345946dbde3d7effd28124c6d6a8c2 +refs/heads/master: 81317fdeddcef259b6ecf7b5c0d04caa167c6b54 diff --git a/trunk/fs/btrfs/transaction.c b/trunk/fs/btrfs/transaction.c index 654755b18951..eb55863bb4ae 100644 --- a/trunk/fs/btrfs/transaction.c +++ b/trunk/fs/btrfs/transaction.c @@ -497,10 +497,17 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, } if (lock && cur_trans->blocked && !cur_trans->in_commit) { - if (throttle) + if (throttle) { + /* + * We may race with somebody else here so end up having + * to call end_transaction on ourselves again, so inc + * our use_count. + */ + trans->use_count++; return btrfs_commit_transaction(trans, root); - else + } else { wake_up_process(info->transaction_kthread); + } } WARN_ON(cur_trans != info->running_transaction);