Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274652
b: refs/heads/master
c: 3880a1b
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent 2565a72 commit 0fdff81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: b24e03db0df3e9164c9649db12fecc8c2d81b0d1
refs/heads/master: 3880a1b46d87a6b030c31889875befc745d95dff
9 changes: 8 additions & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2790,7 +2790,8 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir,
return ERR_PTR(-ENOMEM);
}

trans = btrfs_start_transaction(root, 0);
/* 1 for the orphan item */
trans = btrfs_start_transaction(root, 1);
if (IS_ERR(trans)) {
btrfs_free_path(path);
root->fs_info->enospc_unlink = 0;
Expand Down Expand Up @@ -2895,6 +2896,12 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir,
err = 0;
out:
btrfs_free_path(path);
/* Migrate the orphan reservation over */
if (!err)
err = btrfs_block_rsv_migrate(trans->block_rsv,
&root->fs_info->global_block_rsv,
btrfs_calc_trans_metadata_size(root, 1));

if (err) {
btrfs_end_transaction(trans, root);
root->fs_info->enospc_unlink = 0;
Expand Down

0 comments on commit 0fdff81

Please sign in to comment.