diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 9de4ff03882a..f07ba21cbf06 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -6271,6 +6271,8 @@ int btrfs_drop_snapshot(struct btrfs_root *root, | |||
6271 | BUG_ON(!wc); | 6271 | BUG_ON(!wc); |
6272 | 6272 | ||
6273 | trans = btrfs_start_transaction(tree_root, 0); | 6273 | trans = btrfs_start_transaction(tree_root, 0); |
6274 | BUG_ON(IS_ERR(trans)); | ||
6275 | |||
6274 | if (block_rsv) | 6276 | if (block_rsv) |
6275 | trans->block_rsv = block_rsv; | 6277 | trans->block_rsv = block_rsv; |
6276 | 6278 | ||
@@ -6368,6 +6370,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, | |||
6368 | 6370 | ||
6369 | btrfs_end_transaction_throttle(trans, tree_root); | 6371 | btrfs_end_transaction_throttle(trans, tree_root); |
6370 | trans = btrfs_start_transaction(tree_root, 0); | 6372 | trans = btrfs_start_transaction(tree_root, 0); |
6373 | BUG_ON(IS_ERR(trans)); | ||
6371 | if (block_rsv) | 6374 | if (block_rsv) |
6372 | trans->block_rsv = block_rsv; | 6375 | trans->block_rsv = block_rsv; |
6373 | } | 6376 | } |
@@ -7587,7 +7590,7 @@ int btrfs_cleanup_reloc_trees(struct btrfs_root *root) | |||
7587 | 7590 | ||
7588 | if (found) { | 7591 | if (found) { |
7589 | trans = btrfs_start_transaction(root, 1); | 7592 | trans = btrfs_start_transaction(root, 1); |
7590 | BUG_ON(!trans); | 7593 | BUG_ON(IS_ERR(trans)); |
7591 | ret = btrfs_commit_transaction(trans, root); | 7594 | ret = btrfs_commit_transaction(trans, root); |
7592 | BUG_ON(ret); | 7595 | BUG_ON(ret); |
7593 | } | 7596 | } |
@@ -7831,7 +7834,7 @@ static noinline int relocate_one_extent(struct btrfs_root *extent_root, | |||
7831 | 7834 | ||
7832 | 7835 | ||
7833 | trans = btrfs_start_transaction(extent_root, 1); | 7836 | trans = btrfs_start_transaction(extent_root, 1); |
7834 | BUG_ON(!trans); | 7837 | BUG_ON(IS_ERR(trans)); |
7835 | 7838 | ||
7836 | if (extent_key->objectid == 0) { | 7839 | if (extent_key->objectid == 0) { |
7837 | ret = del_extent_zero(trans, extent_root, path, extent_key); | 7840 | ret = del_extent_zero(trans, extent_root, path, extent_key); |