Patchwork ext3: Return proper error code on ext3_fill_super()

login
register
mail settings
Submitter Namhyung Kim
Date Oct. 11, 2010, 10:08 a.m.
Message ID <1286791686-2973-1-git-send-email-namhyung@gmail.com>
Download mbox | patch
Permalink /patch/67402/
State Not Applicable
Headers show

Comments

Namhyung Kim - Oct. 11, 2010, 10:08 a.m.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 fs/ext3/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Jan Kara - Oct. 11, 2010, 2:44 p.m.
On Mon 11-10-10 19:08:06, Namhyung Kim wrote:
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
  Looks OK. Merged.

							Honza
> ---
>  fs/ext3/super.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext3/super.c b/fs/ext3/super.c
> index 421fad7..75bbf77 100644
> --- a/fs/ext3/super.c
> +++ b/fs/ext3/super.c
> @@ -1871,6 +1871,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
>  	if (sbi->s_group_desc == NULL) {
>  		ext3_msg(sb, KERN_ERR,
>  			"error: not enough memory");
> +		ret = -ENOMEM;
>  		goto failed_mount;
>  	}
>  
> @@ -1958,6 +1959,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
>  	}
>  	if (err) {
>  		ext3_msg(sb, KERN_ERR, "error: insufficient memory");
> +		ret = err;
>  		goto failed_mount3;
>  	}
>  
> -- 
> 1.7.0.4
>

Patch

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 421fad7..75bbf77 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -1871,6 +1871,7 @@  static int ext3_fill_super (struct super_block *sb, void *data, int silent)
 	if (sbi->s_group_desc == NULL) {
 		ext3_msg(sb, KERN_ERR,
 			"error: not enough memory");
+		ret = -ENOMEM;
 		goto failed_mount;
 	}
 
@@ -1958,6 +1959,7 @@  static int ext3_fill_super (struct super_block *sb, void *data, int silent)
 	}
 	if (err) {
 		ext3_msg(sb, KERN_ERR, "error: insufficient memory");
+		ret = err;
 		goto failed_mount3;
 	}