aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-11-05 00:14:04 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-05 00:14:04 -0500
commit498e5f24158da7bf8fa48074a70e370e22844492 (patch)
tree1434b349c8eca3b0667af0b385533cbcd599c1c3 /fs/ext4/mballoc.c
parenta9df9a49102f3578909cba7bd33784eb3b9caaa4 (diff)
ext4: Change unsigned long to unsigned int
Convert the unsigned longs that are most responsible for bloating the stack usage on 64-bit systems. 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/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 6cfe68a7e070..1d78435ce388 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2796,7 +2796,7 @@ void exit_ext4_mballoc(void)
2796 */ 2796 */
2797static noinline_for_stack int 2797static noinline_for_stack int
2798ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, 2798ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
2799 handle_t *handle, unsigned long reserv_blks) 2799 handle_t *handle, unsigned int reserv_blks)
2800{ 2800{
2801 struct buffer_head *bitmap_bh = NULL; 2801 struct buffer_head *bitmap_bh = NULL;
2802 struct ext4_super_block *es; 2802 struct ext4_super_block *es;
@@ -3036,7 +3036,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
3036 /* check we don't cross already preallocated blocks */ 3036 /* check we don't cross already preallocated blocks */
3037 rcu_read_lock(); 3037 rcu_read_lock();
3038 list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) { 3038 list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
3039 unsigned long pa_end; 3039 ext4_lblk_t pa_end;
3040 3040
3041 if (pa->pa_deleted) 3041 if (pa->pa_deleted)
3042 continue; 3042 continue;
@@ -3080,7 +3080,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
3080 /* XXX: extra loop to check we really don't overlap preallocations */ 3080 /* XXX: extra loop to check we really don't overlap preallocations */
3081 rcu_read_lock(); 3081 rcu_read_lock();
3082 list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) { 3082 list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
3083 unsigned long pa_end; 3083 ext4_lblk_t pa_end;
3084 spin_lock(&pa->pa_lock); 3084 spin_lock(&pa->pa_lock);
3085 if (pa->pa_deleted == 0) { 3085 if (pa->pa_deleted == 0) {
3086 pa_end = pa->pa_lstart + pa->pa_len; 3086 pa_end = pa->pa_lstart + pa->pa_len;
@@ -3584,8 +3584,8 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
3584{ 3584{
3585 struct super_block *sb = e4b->bd_sb; 3585 struct super_block *sb = e4b->bd_sb;
3586 struct ext4_sb_info *sbi = EXT4_SB(sb); 3586 struct ext4_sb_info *sbi = EXT4_SB(sb);
3587 unsigned long end; 3587 unsigned int end;
3588 unsigned long next; 3588 unsigned int next;
3589 ext4_group_t group; 3589 ext4_group_t group;
3590 ext4_grpblk_t bit; 3590 ext4_grpblk_t bit;
3591 sector_t start; 3591 sector_t start;
@@ -4029,8 +4029,8 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac,
4029 struct ext4_sb_info *sbi = EXT4_SB(sb); 4029 struct ext4_sb_info *sbi = EXT4_SB(sb);
4030 struct ext4_super_block *es = sbi->s_es; 4030 struct ext4_super_block *es = sbi->s_es;
4031 ext4_group_t group; 4031 ext4_group_t group;
4032 unsigned long len; 4032 unsigned int len;
4033 unsigned long goal; 4033 ext4_fsblk_t goal;
4034 ext4_grpblk_t block; 4034 ext4_grpblk_t block;
4035 4035
4036 /* we can't allocate > group size */ 4036 /* we can't allocate > group size */
@@ -4291,8 +4291,8 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
4291 struct ext4_sb_info *sbi; 4291 struct ext4_sb_info *sbi;
4292 struct super_block *sb; 4292 struct super_block *sb;
4293 ext4_fsblk_t block = 0; 4293 ext4_fsblk_t block = 0;
4294 unsigned long inquota; 4294 unsigned int inquota;
4295 unsigned long reserv_blks = 0; 4295 unsigned int reserv_blks = 0;
4296 4296
4297 sb = ar->inode->i_sb; 4297 sb = ar->inode->i_sb;
4298 sbi = EXT4_SB(sb); 4298 sbi = EXT4_SB(sb);
@@ -4504,7 +4504,7 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode,
4504 struct ext4_allocation_context *ac = NULL; 4504 struct ext4_allocation_context *ac = NULL;
4505 struct ext4_group_desc *gdp; 4505 struct ext4_group_desc *gdp;
4506 struct ext4_super_block *es; 4506 struct ext4_super_block *es;
4507 unsigned long overflow; 4507 unsigned int overflow;
4508 ext4_grpblk_t bit; 4508 ext4_grpblk_t bit;
4509 struct buffer_head *gd_bh; 4509 struct buffer_head *gd_bh;
4510 ext4_group_t block_group; 4510 ext4_group_t block_group;