Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297874
b: refs/heads/master
c: 2c53679
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and David Sterba committed Mar 22, 2012
1 parent b5f947f commit 983fa57
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fbe5c02ae5a59053d779392b9a12aa8f6d6198e
refs/heads/master: 2c536799f1bde905bbacf7af3aa6be3f4de66005
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2661,9 +2661,9 @@ static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p)
}
int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);
void btrfs_drop_snapshot(struct btrfs_root *root,
struct btrfs_block_rsv *block_rsv, int update_ref,
int for_reloc);
int __must_check btrfs_drop_snapshot(struct btrfs_root *root,
struct btrfs_block_rsv *block_rsv,
int update_ref, int for_reloc);
int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct extent_buffer *node,
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -6734,7 +6734,7 @@ static noinline int walk_up_tree(struct btrfs_trans_handle *trans,
* also make sure backrefs for the shared block and all lower level
* blocks are properly updated.
*/
void btrfs_drop_snapshot(struct btrfs_root *root,
int btrfs_drop_snapshot(struct btrfs_root *root,
struct btrfs_block_rsv *block_rsv, int update_ref,
int for_reloc)
{
Expand Down Expand Up @@ -6902,7 +6902,7 @@ void btrfs_drop_snapshot(struct btrfs_root *root,
out:
if (err)
btrfs_std_error(root->fs_info, err);
return;
return err;
}

/*
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/relocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,8 @@ int merge_reloc_roots(struct reloc_control *rc)
} else {
list_del_init(&reloc_root->root_list);
}
btrfs_drop_snapshot(reloc_root, rc->block_rsv, 0, 1);
ret = btrfs_drop_snapshot(reloc_root, rc->block_rsv, 0, 1);
BUG_ON(ret < 0);
}

if (found) {
Expand Down
7 changes: 5 additions & 2 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,16 +1387,19 @@ int btrfs_clean_old_snapshots(struct btrfs_root *root)
spin_unlock(&fs_info->trans_lock);

while (!list_empty(&list)) {
int ret;

root = list_entry(list.next, struct btrfs_root, root_list);
list_del(&root->root_list);

btrfs_kill_all_delayed_nodes(root);

if (btrfs_header_backref_rev(root->node) <
BTRFS_MIXED_BACKREF_REV)
btrfs_drop_snapshot(root, NULL, 0, 0);
ret = btrfs_drop_snapshot(root, NULL, 0, 0);
else
btrfs_drop_snapshot(root, NULL, 1, 0);
ret =btrfs_drop_snapshot(root, NULL, 1, 0);
BUG_ON(ret < 0);
}
return 0;
}

0 comments on commit 983fa57

Please sign in to comment.