aboutsummaryrefslogtreecommitdiff
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 2b15daa3a9f..29755593de6 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -239,7 +239,9 @@ struct dirty_root {
struct btrfs_root *latest_root;
};
-int btrfs_add_dead_root(struct btrfs_root *root, struct list_head *dead_list)
+int btrfs_add_dead_root(struct btrfs_root *root,
+ struct btrfs_root *latest,
+ struct list_head *dead_list)
{
struct dirty_root *dirty;
@@ -247,6 +249,7 @@ int btrfs_add_dead_root(struct btrfs_root *root, struct list_head *dead_list)
if (!dirty)
return -ENOMEM;
dirty->root = root;
+ dirty->latest_root = latest;
list_add(&dirty->list, dead_list);
return 0;
}
@@ -412,7 +415,6 @@ static int drop_dirty_roots(struct btrfs_root *tree_root,
while(1) {
trans = btrfs_start_transaction(tree_root, 1);
-
ret = btrfs_drop_snapshot(trans, dirty->root);
if (ret != -EAGAIN) {
break;