diff options
-rw-r--r-- | fs/reiserfs/do_balan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c index fba304e64de8..f85c5cf4934c 100644 --- a/fs/reiserfs/do_balan.c +++ b/fs/reiserfs/do_balan.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/time.h> | 19 | #include <linux/time.h> |
20 | #include <linux/reiserfs_fs.h> | 20 | #include <linux/reiserfs_fs.h> |
21 | #include <linux/buffer_head.h> | 21 | #include <linux/buffer_head.h> |
22 | #include <linux/kernel.h> | ||
22 | 23 | ||
23 | #ifdef CONFIG_REISERFS_CHECK | 24 | #ifdef CONFIG_REISERFS_CHECK |
24 | 25 | ||
@@ -1756,7 +1757,7 @@ static void store_thrown(struct tree_balance *tb, struct buffer_head *bh) | |||
1756 | if (buffer_dirty(bh)) | 1757 | if (buffer_dirty(bh)) |
1757 | reiserfs_warning(tb->tb_sb, | 1758 | reiserfs_warning(tb->tb_sb, |
1758 | "store_thrown deals with dirty buffer"); | 1759 | "store_thrown deals with dirty buffer"); |
1759 | for (i = 0; i < sizeof(tb->thrown) / sizeof(tb->thrown[0]); i++) | 1760 | for (i = 0; i < ARRAY_SIZE(tb->thrown); i++) |
1760 | if (!tb->thrown[i]) { | 1761 | if (!tb->thrown[i]) { |
1761 | tb->thrown[i] = bh; | 1762 | tb->thrown[i] = bh; |
1762 | get_bh(bh); /* free_thrown puts this */ | 1763 | get_bh(bh); /* free_thrown puts this */ |
@@ -1769,7 +1770,7 @@ static void free_thrown(struct tree_balance *tb) | |||
1769 | { | 1770 | { |
1770 | int i; | 1771 | int i; |
1771 | b_blocknr_t blocknr; | 1772 | b_blocknr_t blocknr; |
1772 | for (i = 0; i < sizeof(tb->thrown) / sizeof(tb->thrown[0]); i++) { | 1773 | for (i = 0; i < ARRAY_SIZE(tb->thrown); i++) { |
1773 | if (tb->thrown[i]) { | 1774 | if (tb->thrown[i]) { |
1774 | blocknr = tb->thrown[i]->b_blocknr; | 1775 | blocknr = tb->thrown[i]->b_blocknr; |
1775 | if (buffer_dirty(tb->thrown[i])) | 1776 | if (buffer_dirty(tb->thrown[i])) |