diff options
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index ea9965430241..1f5556acb530 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -2028,6 +2028,7 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc, | |||
2028 | 2028 | ||
2029 | while (1) { | 2029 | while (1) { |
2030 | trans = btrfs_start_transaction(root, 0); | 2030 | trans = btrfs_start_transaction(root, 0); |
2031 | BUG_ON(IS_ERR(trans)); | ||
2031 | trans->block_rsv = rc->block_rsv; | 2032 | trans->block_rsv = rc->block_rsv; |
2032 | 2033 | ||
2033 | ret = btrfs_block_rsv_check(trans, root, rc->block_rsv, | 2034 | ret = btrfs_block_rsv_check(trans, root, rc->block_rsv, |
@@ -3665,6 +3666,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) | |||
3665 | 3666 | ||
3666 | while (1) { | 3667 | while (1) { |
3667 | trans = btrfs_start_transaction(rc->extent_root, 0); | 3668 | trans = btrfs_start_transaction(rc->extent_root, 0); |
3669 | BUG_ON(IS_ERR(trans)); | ||
3668 | 3670 | ||
3669 | if (update_backref_cache(trans, &rc->backref_cache)) { | 3671 | if (update_backref_cache(trans, &rc->backref_cache)) { |
3670 | btrfs_end_transaction(trans, rc->extent_root); | 3672 | btrfs_end_transaction(trans, rc->extent_root); |
@@ -4033,6 +4035,7 @@ static noinline_for_stack int mark_garbage_root(struct btrfs_root *root) | |||
4033 | int ret; | 4035 | int ret; |
4034 | 4036 | ||
4035 | trans = btrfs_start_transaction(root->fs_info->tree_root, 0); | 4037 | trans = btrfs_start_transaction(root->fs_info->tree_root, 0); |
4038 | BUG_ON(IS_ERR(trans)); | ||
4036 | 4039 | ||
4037 | memset(&root->root_item.drop_progress, 0, | 4040 | memset(&root->root_item.drop_progress, 0, |
4038 | sizeof(root->root_item.drop_progress)); | 4041 | sizeof(root->root_item.drop_progress)); |