提交 c271b492 编写于 作者: D Daniel Cadete 提交者: Chris Mason

Btrfs: remove of redundant btrfs_header_level

This removes the continues call's of btrfs_header_level. One call of
btrfs_header_level(c) its enough.

Signed-off-by Daniel Cadete <danielncadete10@gmail.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 33c17ad5
...@@ -309,7 +309,7 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) ...@@ -309,7 +309,7 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
} }
printk(KERN_INFO "node %llu level %d total ptrs %d free spc %u\n", printk(KERN_INFO "node %llu level %d total ptrs %d free spc %u\n",
(unsigned long long)btrfs_header_bytenr(c), (unsigned long long)btrfs_header_bytenr(c),
btrfs_header_level(c), nr, level, nr,
(u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr);
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
btrfs_node_key_to_cpu(c, &key, i); btrfs_node_key_to_cpu(c, &key, i);
...@@ -326,10 +326,10 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) ...@@ -326,10 +326,10 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
btrfs_level_size(root, level - 1), btrfs_level_size(root, level - 1),
btrfs_node_ptr_generation(c, i)); btrfs_node_ptr_generation(c, i));
if (btrfs_is_leaf(next) && if (btrfs_is_leaf(next) &&
btrfs_header_level(c) != 1) level != 1)
BUG(); BUG();
if (btrfs_header_level(next) != if (btrfs_header_level(next) !=
btrfs_header_level(c) - 1) level - 1)
BUG(); BUG();
btrfs_print_tree(root, next); btrfs_print_tree(root, next);
free_extent_buffer(next); free_extent_buffer(next);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册