aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index cfe7f588ef05..c346d320173a 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -853,6 +853,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
853 goto fail; 853 goto fail;
854 } 854 }
855 855
856 btrfs_reloc_pre_snapshot(trans, pending, &to_reserve);
856 btrfs_orphan_pre_snapshot(trans, pending, &to_reserve); 857 btrfs_orphan_pre_snapshot(trans, pending, &to_reserve);
857 858
858 if (to_reserve > 0) { 859 if (to_reserve > 0) {
@@ -924,6 +925,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
924 pending->snap = btrfs_read_fs_root_no_name(root->fs_info, &key); 925 pending->snap = btrfs_read_fs_root_no_name(root->fs_info, &key);
925 BUG_ON(IS_ERR(pending->snap)); 926 BUG_ON(IS_ERR(pending->snap));
926 927
928 btrfs_reloc_post_snapshot(trans, pending);
927 btrfs_orphan_post_snapshot(trans, pending); 929 btrfs_orphan_post_snapshot(trans, pending);
928fail: 930fail:
929 kfree(new_root_item); 931 kfree(new_root_item);
@@ -1213,9 +1215,9 @@ int btrfs_clean_old_snapshots(struct btrfs_root *root)
1213 1215
1214 if (btrfs_header_backref_rev(root->node) < 1216 if (btrfs_header_backref_rev(root->node) <
1215 BTRFS_MIXED_BACKREF_REV) 1217 BTRFS_MIXED_BACKREF_REV)
1216 btrfs_drop_snapshot(root, 0); 1218 btrfs_drop_snapshot(root, NULL, 0);
1217 else 1219 else
1218 btrfs_drop_snapshot(root, 1); 1220 btrfs_drop_snapshot(root, NULL, 1);
1219 } 1221 }
1220 return 0; 1222 return 0;
1221} 1223}