diff options
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2b15daa3a9f2..29755593de65 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -239,7 +239,9 @@ struct dirty_root { | |||
239 | struct btrfs_root *latest_root; | 239 | struct btrfs_root *latest_root; |
240 | }; | 240 | }; |
241 | 241 | ||
242 | int btrfs_add_dead_root(struct btrfs_root *root, struct list_head *dead_list) | 242 | int btrfs_add_dead_root(struct btrfs_root *root, |
243 | struct btrfs_root *latest, | ||
244 | struct list_head *dead_list) | ||
243 | { | 245 | { |
244 | struct dirty_root *dirty; | 246 | struct dirty_root *dirty; |
245 | 247 | ||
@@ -247,6 +249,7 @@ int btrfs_add_dead_root(struct btrfs_root *root, struct list_head *dead_list) | |||
247 | if (!dirty) | 249 | if (!dirty) |
248 | return -ENOMEM; | 250 | return -ENOMEM; |
249 | dirty->root = root; | 251 | dirty->root = root; |
252 | dirty->latest_root = latest; | ||
250 | list_add(&dirty->list, dead_list); | 253 | list_add(&dirty->list, dead_list); |
251 | return 0; | 254 | return 0; |
252 | } | 255 | } |
@@ -412,7 +415,6 @@ static int drop_dirty_roots(struct btrfs_root *tree_root, | |||
412 | 415 | ||
413 | while(1) { | 416 | while(1) { |
414 | trans = btrfs_start_transaction(tree_root, 1); | 417 | trans = btrfs_start_transaction(tree_root, 1); |
415 | |||
416 | ret = btrfs_drop_snapshot(trans, dirty->root); | 418 | ret = btrfs_drop_snapshot(trans, dirty->root); |
417 | if (ret != -EAGAIN) { | 419 | if (ret != -EAGAIN) { |
418 | break; | 420 | break; |