diff options
Diffstat (limited to 'fs/reiserfs/prints.c')
-rw-r--r-- | fs/reiserfs/prints.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c index d55e164bd5c2..78b40621b88b 100644 --- a/fs/reiserfs/prints.c +++ b/fs/reiserfs/prints.c | |||
@@ -601,8 +601,7 @@ void store_print_tb(struct tree_balance *tb) | |||
601 | tb->tb_mode, PATH_LAST_POSITION(tb->tb_path), | 601 | tb->tb_mode, PATH_LAST_POSITION(tb->tb_path), |
602 | tb->tb_path->pos_in_item); | 602 | tb->tb_path->pos_in_item); |
603 | 603 | ||
604 | for (h = 0; h < sizeof(tb->insert_size) / sizeof(tb->insert_size[0]); | 604 | for (h = 0; h < ARRAY_SIZE(tb->insert_size); h++) { |
605 | h++) { | ||
606 | if (PATH_H_PATH_OFFSET(tb->tb_path, h) <= | 605 | if (PATH_H_PATH_OFFSET(tb->tb_path, h) <= |
607 | tb->tb_path->path_length | 606 | tb->tb_path->path_length |
608 | && PATH_H_PATH_OFFSET(tb->tb_path, | 607 | && PATH_H_PATH_OFFSET(tb->tb_path, |
@@ -658,15 +657,13 @@ void store_print_tb(struct tree_balance *tb) | |||
658 | 657 | ||
659 | /* print FEB list (list of buffers in form (bh (b_blocknr, b_count), that will be used for new nodes) */ | 658 | /* print FEB list (list of buffers in form (bh (b_blocknr, b_count), that will be used for new nodes) */ |
660 | h = 0; | 659 | h = 0; |
661 | for (i = 0; i < sizeof(tb->FEB) / sizeof(tb->FEB[0]); i++) | 660 | for (i = 0; i < ARRAY_SIZE(tb->FEB); i++) |
662 | sprintf(print_tb_buf + strlen(print_tb_buf), | 661 | sprintf(print_tb_buf + strlen(print_tb_buf), |
663 | "%p (%llu %d)%s", tb->FEB[i], | 662 | "%p (%llu %d)%s", tb->FEB[i], |
664 | tb->FEB[i] ? (unsigned long long)tb->FEB[i]-> | 663 | tb->FEB[i] ? (unsigned long long)tb->FEB[i]-> |
665 | b_blocknr : 0ULL, | 664 | b_blocknr : 0ULL, |
666 | tb->FEB[i] ? atomic_read(&(tb->FEB[i]->b_count)) : 0, | 665 | tb->FEB[i] ? atomic_read(&(tb->FEB[i]->b_count)) : 0, |
667 | (i == | 666 | (i == ARRAY_SIZE(tb->FEB) - 1) ? "\n" : ", "); |
668 | sizeof(tb->FEB) / sizeof(tb->FEB[0]) - | ||
669 | 1) ? "\n" : ", "); | ||
670 | 667 | ||
671 | sprintf(print_tb_buf + strlen(print_tb_buf), | 668 | sprintf(print_tb_buf + strlen(print_tb_buf), |
672 | "======================== the end ====================================\n"); | 669 | "======================== the end ====================================\n"); |