Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275313
b: refs/heads/master
c: 917c16b
h: refs/heads/master
i:
  275311: 1af534d
v: v3
  • Loading branch information
Chris Mason committed Nov 8, 2011
1 parent cf52c43 commit 264f39a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 45ea6095c8f0d6caad5658306416a5d254f1205e
refs/heads/master: 917c16b2b69fc2eeb432eabca73258f08c58361e
16 changes: 9 additions & 7 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -6529,14 +6529,16 @@ static int btrfs_truncate(struct inode *inode)
ret = btrfs_orphan_del(NULL, inode);
}

trans->block_rsv = &root->fs_info->trans_block_rsv;
ret = btrfs_update_inode(trans, root, inode);
if (ret && !err)
err = ret;
if (trans) {
trans->block_rsv = &root->fs_info->trans_block_rsv;
ret = btrfs_update_inode(trans, root, inode);
if (ret && !err)
err = ret;

nr = trans->blocks_used;
ret = btrfs_end_transaction_throttle(trans, root);
btrfs_btree_balance_dirty(root, nr);
nr = trans->blocks_used;
ret = btrfs_end_transaction_throttle(trans, root);
btrfs_btree_balance_dirty(root, nr);
}

out:
btrfs_free_block_rsv(root, rsv);
Expand Down

0 comments on commit 264f39a

Please sign in to comment.