Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128421
b: refs/heads/master
c: a1f3963
h: refs/heads/master
i:
  128419: 5393a6d
v: v3
  • Loading branch information
Aneesh authored and David Woodhouse committed Jul 11, 2007
1 parent dcc5eb2 commit bfd2497
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 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: ec6b910fb330f29e169c9f502c3ac209515af8d1
refs/heads/master: a1f396304fb7e5f18e4ea81c294415375f1c814c
8 changes: 6 additions & 2 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ static int check_node(struct btrfs_root *root, struct btrfs_path *path,

if (path->nodes[level + 1])
parent = btrfs_buffer_node(path->nodes[level + 1]);
parent_slot = path->slots[level + 1];

slot = path->slots[level];
BUG_ON(nritems == 0);
if (parent) {
struct btrfs_disk_key *parent_key;

parent_slot = path->slots[level + 1];
parent_key = &parent->ptrs[parent_slot].key;
BUG_ON(memcmp(parent_key, &node->ptrs[0].key,
sizeof(struct btrfs_disk_key)));
Expand Down Expand Up @@ -208,14 +210,16 @@ static int check_leaf(struct btrfs_root *root, struct btrfs_path *path,

if (path->nodes[level + 1])
parent = btrfs_buffer_node(path->nodes[level + 1]);
parent_slot = path->slots[level + 1];

BUG_ON(btrfs_leaf_free_space(root, leaf) < 0);

if (nritems == 0)
return 0;

if (parent) {
struct btrfs_disk_key *parent_key;

parent_slot = path->slots[level + 1];
parent_key = &parent->ptrs[parent_slot].key;
BUG_ON(memcmp(parent_key, &leaf->items[0].key,
sizeof(struct btrfs_disk_key)));
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/root-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ int btrfs_find_dead_roots(struct btrfs_root *root)
if (btrfs_root_refs(ri) != 0)
goto next;
dead_root = btrfs_read_fs_root_no_radix(root->fs_info, &key);
if (IS_ERR(root)) {
ret = PTR_ERR(root);
if (IS_ERR(dead_root)) {
ret = PTR_ERR(dead_root);
goto err;
}
ret = btrfs_add_dead_root(dead_root,
Expand Down

0 comments on commit bfd2497

Please sign in to comment.