diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-01-05 22:18:16 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-01-05 22:18:16 -0500 |
commit | a9df9a49102f3578909cba7bd33784eb3b9caaa4 (patch) | |
tree | 1d383d422bf7185e8e87c1bcfc80f9beb3074cf8 /fs/ext4/ialloc.c | |
parent | cde6436004ad9cd8cab5a874b6fa8b01f1da91bf (diff) |
ext4: Make ext4_group_t be an unsigned int
Nearly all places in the ext3/4 code which uses "unsigned long" is
probably a bug, since on 32-bit systems a ulong a 32-bits, which means
we are wasting stack space on 64-bit systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 4794d2ce6130..cac3617ec780 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -74,7 +74,7 @@ unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, | |||
74 | /* If checksum is bad mark all blocks and inodes use to prevent | 74 | /* If checksum is bad mark all blocks and inodes use to prevent |
75 | * allocation, essentially implementing a per-group read-only flag. */ | 75 | * allocation, essentially implementing a per-group read-only flag. */ |
76 | if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) { | 76 | if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) { |
77 | ext4_error(sb, __func__, "Checksum bad for group %lu", | 77 | ext4_error(sb, __func__, "Checksum bad for group %u", |
78 | block_group); | 78 | block_group); |
79 | gdp->bg_free_blocks_count = 0; | 79 | gdp->bg_free_blocks_count = 0; |
80 | gdp->bg_free_inodes_count = 0; | 80 | gdp->bg_free_inodes_count = 0; |
@@ -111,7 +111,7 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) | |||
111 | if (unlikely(!bh)) { | 111 | if (unlikely(!bh)) { |
112 | ext4_error(sb, __func__, | 112 | ext4_error(sb, __func__, |
113 | "Cannot read inode bitmap - " | 113 | "Cannot read inode bitmap - " |
114 | "block_group = %lu, inode_bitmap = %llu", | 114 | "block_group = %u, inode_bitmap = %llu", |
115 | block_group, bitmap_blk); | 115 | block_group, bitmap_blk); |
116 | return NULL; | 116 | return NULL; |
117 | } | 117 | } |
@@ -133,7 +133,7 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) | |||
133 | put_bh(bh); | 133 | put_bh(bh); |
134 | ext4_error(sb, __func__, | 134 | ext4_error(sb, __func__, |
135 | "Cannot read inode bitmap - " | 135 | "Cannot read inode bitmap - " |
136 | "block_group = %lu, inode_bitmap = %llu", | 136 | "block_group = %u, inode_bitmap = %llu", |
137 | block_group, bitmap_blk); | 137 | block_group, bitmap_blk); |
138 | return NULL; | 138 | return NULL; |
139 | } | 139 | } |
@@ -690,7 +690,7 @@ got: | |||
690 | ino > EXT4_INODES_PER_GROUP(sb)) { | 690 | ino > EXT4_INODES_PER_GROUP(sb)) { |
691 | ext4_error(sb, __func__, | 691 | ext4_error(sb, __func__, |
692 | "reserved inode or inode > inodes count - " | 692 | "reserved inode or inode > inodes count - " |
693 | "block_group = %lu, inode=%lu", group, | 693 | "block_group = %u, inode=%lu", group, |
694 | ino + group * EXT4_INODES_PER_GROUP(sb)); | 694 | ino + group * EXT4_INODES_PER_GROUP(sb)); |
695 | err = -EIO; | 695 | err = -EIO; |
696 | goto fail; | 696 | goto fail; |