Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274651
b: refs/heads/master
c: b24e03d
h: refs/heads/master
i:
  274649: 79881ea
  274647: 02519d4
v: v3
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent c2b4a50 commit 2565a72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 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: 877da174301dde9062b915da4c8103048be49702
refs/heads/master: b24e03db0df3e9164c9649db12fecc8c2d81b0d1
5 changes: 1 addition & 4 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3909,13 +3909,10 @@ static void release_global_block_rsv(struct btrfs_fs_info *fs_info)
void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans,
struct btrfs_root *root)
{
struct btrfs_block_rsv *block_rsv;

if (!trans->bytes_reserved)
return;

block_rsv = &root->fs_info->trans_block_rsv;
btrfs_block_rsv_release(root, block_rsv, trans->bytes_reserved);
btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved);
trans->bytes_reserved = 0;
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
return 0;
}

btrfs_trans_release_metadata(trans, root);
trans->block_rsv = NULL;
while (count < 4) {
unsigned long cur = trans->delayed_ref_updates;
Expand All @@ -483,8 +484,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
count++;
}

btrfs_trans_release_metadata(trans, root);

if (lock && !atomic_read(&root->fs_info->open_ioctl_trans) &&
should_end_transaction(trans, root)) {
trans->transaction->blocked = 1;
Expand Down Expand Up @@ -1128,6 +1127,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,

btrfs_run_ordered_operations(root, 0);

btrfs_trans_release_metadata(trans, root);
trans->block_rsv = NULL;

/* make a pass through all the delayed refs we have so far
Expand All @@ -1136,8 +1136,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
ret = btrfs_run_delayed_refs(trans, root, 0);
BUG_ON(ret);

btrfs_trans_release_metadata(trans, root);

cur_trans = trans->transaction;
/*
* set the flushing flag so procs in this transaction have to
Expand Down

0 comments on commit 2565a72

Please sign in to comment.