From 62e2b8d46468d36ae1398b214e6c644153f6aae7 Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Tue, 29 Apr 2008 22:01:15 -0400 Subject: [PATCH] --- yaml --- r: 95065 b: refs/heads/master c: f1fa3342e271029f93d323ca664809b94594fe04 h: refs/heads/master i: 95063: 6a461c92c7f2c78b50a5e77c3398539b823f4ae6 v: v3 --- [refs] | 2 +- trunk/fs/ext4/mballoc.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 69b287298b99..cc00d35d6a86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f8a87d89304c1eea8e4a8dc02d134f57590913c6 +refs/heads/master: f1fa3342e271029f93d323ca664809b94594fe04 diff --git a/trunk/fs/ext4/mballoc.c b/trunk/fs/ext4/mballoc.c index 11e1fd59acbd..fbec2ef93797 100644 --- a/trunk/fs/ext4/mballoc.c +++ b/trunk/fs/ext4/mballoc.c @@ -2272,13 +2272,13 @@ static int ext4_mb_init_backend(struct super_block *sb) meta_group_info[j] = kzalloc(len, GFP_KERNEL); if (meta_group_info[j] == NULL) { printk(KERN_ERR "EXT4-fs: can't allocate buddy mem\n"); - i--; goto err_freebuddy; } desc = ext4_get_group_desc(sb, i, NULL); if (desc == NULL) { printk(KERN_ERR "EXT4-fs: can't read descriptor %lu\n", i); + i++; goto err_freebuddy; } memset(meta_group_info[j], 0, len); @@ -2318,13 +2318,11 @@ static int ext4_mb_init_backend(struct super_block *sb) return 0; err_freebuddy: - while (i >= 0) { + while (i-- > 0) kfree(ext4_get_group_info(sb, i)); - i--; - } i = num_meta_group_infos; err_freemeta: - while (--i >= 0) + while (i-- > 0) kfree(sbi->s_group_info[i]); iput(sbi->s_buddy_cache); err_freesgi: