Commit c271b492419a18908ba19ee02b231fb305a27023
Committed by
Chris Mason
1 parent
33c17ad571
Exists in
master
and in
7 other branches
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: Chris Mason <chris.mason@oracle.com>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
fs/btrfs/print-tree.c
... | ... | @@ -309,7 +309,7 @@ |
309 | 309 | } |
310 | 310 | printk(KERN_INFO "node %llu level %d total ptrs %d free spc %u\n", |
311 | 311 | (unsigned long long)btrfs_header_bytenr(c), |
312 | - btrfs_header_level(c), nr, | |
312 | + level, nr, | |
313 | 313 | (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); |
314 | 314 | for (i = 0; i < nr; i++) { |
315 | 315 | btrfs_node_key_to_cpu(c, &key, i); |
316 | 316 | |
... | ... | @@ -326,10 +326,10 @@ |
326 | 326 | btrfs_level_size(root, level - 1), |
327 | 327 | btrfs_node_ptr_generation(c, i)); |
328 | 328 | if (btrfs_is_leaf(next) && |
329 | - btrfs_header_level(c) != 1) | |
329 | + level != 1) | |
330 | 330 | BUG(); |
331 | 331 | if (btrfs_header_level(next) != |
332 | - btrfs_header_level(c) - 1) | |
332 | + level - 1) | |
333 | 333 | BUG(); |
334 | 334 | btrfs_print_tree(root, next); |
335 | 335 | free_extent_buffer(next); |