Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360437
b: refs/heads/master
c: e4a2bca
h: refs/heads/master
i:
  360435: 134ea58
v: v3
  • Loading branch information
Josef Bacik committed Feb 20, 2013
1 parent 4f5c91a commit 9a7297a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e04e7f10b68999e0d8321516ea19d9d5b044dee
refs/heads/master: e4a2bcaca9643e7430207810653222fc5187f2be
18 changes: 12 additions & 6 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1476,21 +1476,25 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
ret = btrfs_run_ordered_operations(root, 0);
if (ret) {
btrfs_abort_transaction(trans, root, ret);
goto cleanup_transaction;
btrfs_end_transaction(trans, root);
return ret;
}

/* Stop the commit early if ->aborted is set */
if (unlikely(ACCESS_ONCE(cur_trans->aborted))) {
ret = cur_trans->aborted;
goto cleanup_transaction;
btrfs_end_transaction(trans, root);
return ret;
}

/* make a pass through all the delayed refs we have so far
* any runnings procs may add more while we are here
*/
ret = btrfs_run_delayed_refs(trans, root, 0);
if (ret)
goto cleanup_transaction;
if (ret) {
btrfs_end_transaction(trans, root);
return ret;
}

btrfs_trans_release_metadata(trans, root);
trans->block_rsv = NULL;
Expand All @@ -1507,8 +1511,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
btrfs_create_pending_block_groups(trans, root);

ret = btrfs_run_delayed_refs(trans, root, 0);
if (ret)
goto cleanup_transaction;
if (ret) {
btrfs_end_transaction(trans, root);
return ret;
}

spin_lock(&cur_trans->commit_lock);
if (cur_trans->in_commit) {
Expand Down

0 comments on commit 9a7297a

Please sign in to comment.