From 4d4b62e433e38915946fb531b29f19bb76f2fa4b Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Tue, 27 Jul 2010 11:56:07 -0400 Subject: [PATCH] --- yaml --- r: 206310 b: refs/heads/master c: dcc7dae3cb21184a317f10a12250bd8d6f458077 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/super.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index f54f777737bf..ec461efb7dde 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0c095c7f113e9fd05913d6e1b2cccbe356be039e +refs/heads/master: dcc7dae3cb21184a317f10a12250bd8d6f458077 diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index ed00c14d7081..d573f6c1a4de 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -2550,7 +2550,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) struct inode *root; char *cp; const char *descr; - int ret = -EINVAL; + int ret = -ENOMEM; int blocksize; unsigned int db_count; unsigned int i; @@ -2561,13 +2561,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) - return -ENOMEM; + goto out_free_orig; sbi->s_blockgroup_lock = kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL); if (!sbi->s_blockgroup_lock) { kfree(sbi); - return -ENOMEM; + goto out_free_orig; } sb->s_fs_info = sbi; sbi->s_mount_opt = 0; @@ -2584,6 +2584,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) for (cp = sb->s_id; (cp = strchr(cp, '/'));) *cp = '!'; + ret = -EINVAL; blocksize = sb_min_blocksize(sb, EXT4_MIN_BLOCK_SIZE); if (!blocksize) { ext4_msg(sb, KERN_ERR, "unable to set blocksize"); @@ -3190,6 +3191,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) kfree(sbi->s_blockgroup_lock); kfree(sbi); lock_kernel(); +out_free_orig: kfree(orig_data); return ret; }