diff mbox

ext3: Return error code from generic_check_addressable

Message ID 20101116225744.GD18195@tux1.beaverton.ibm.com
State Not Applicable, archived
Headers show

Commit Message

Darrick J. Wong Nov. 16, 2010, 10:57 p.m. UTC
ext3: Return error code from generic_check_accessible

ext3_fill_super should return the error code that generic_check_accessible
returns when an error condition occurs.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

 fs/ext3/super.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Lukas Czerner Nov. 18, 2010, 8:52 a.m. UTC | #1
On Tue, 16 Nov 2010, Darrick J. Wong wrote:

> ext3: Return error code from generic_check_accessible
> 
> ext3_fill_super should return the error code that generic_check_accessible
> returns when an error condition occurs.
> 
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
> 
>  fs/ext3/super.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext3/super.c b/fs/ext3/super.c
> index 2fedaf8..960629b 100644
> --- a/fs/ext3/super.c
> +++ b/fs/ext3/super.c
> @@ -1842,13 +1842,15 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
>  		goto failed_mount;
>  	}
>  
> -	if (generic_check_addressable(sb->s_blocksize_bits,
> -				      le32_to_cpu(es->s_blocks_count))) {
> +	err = generic_check_addressable(sb->s_blocksize_bits,
> +					le32_to_cpu(es->s_blocks_count));
> +	if (err) {
>  		ext3_msg(sb, KERN_ERR,
>  			"error: filesystem is too large to mount safely");
>  		if (sizeof(sector_t) < 8)
>  			ext3_msg(sb, KERN_ERR,
>  				"error: CONFIG_LBDAF not enabled");
> +		ret = err;
>  		goto failed_mount;
>  	}
>  
> 

Add Jan Kara to cc list.

-Lukas

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Kara Nov. 22, 2010, 6:27 p.m. UTC | #2
On Thu 18-11-10 09:52:51, Lukas Czerner wrote:
> On Tue, 16 Nov 2010, Darrick J. Wong wrote:
> 
> > ext3: Return error code from generic_check_accessible
> > 
> > ext3_fill_super should return the error code that generic_check_accessible
> > returns when an error condition occurs.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> > ---
> > 
> >  fs/ext3/super.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/ext3/super.c b/fs/ext3/super.c
> > index 2fedaf8..960629b 100644
> > --- a/fs/ext3/super.c
> > +++ b/fs/ext3/super.c
> > @@ -1842,13 +1842,15 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
> >  		goto failed_mount;
> >  	}
> >  
> > -	if (generic_check_addressable(sb->s_blocksize_bits,
> > -				      le32_to_cpu(es->s_blocks_count))) {
> > +	err = generic_check_addressable(sb->s_blocksize_bits,
> > +					le32_to_cpu(es->s_blocks_count));
> > +	if (err) {
> >  		ext3_msg(sb, KERN_ERR,
> >  			"error: filesystem is too large to mount safely");
> >  		if (sizeof(sector_t) < 8)
> >  			ext3_msg(sb, KERN_ERR,
> >  				"error: CONFIG_LBDAF not enabled");
> > +		ret = err;
> >  		goto failed_mount;
> >  	}
> >  
> > 
> 
> Add Jan Kara to cc list.
  Thanks for forwarding. Merged.

								Honza
diff mbox

Patch

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 2fedaf8..960629b 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -1842,13 +1842,15 @@  static int ext3_fill_super (struct super_block *sb, void *data, int silent)
 		goto failed_mount;
 	}
 
-	if (generic_check_addressable(sb->s_blocksize_bits,
-				      le32_to_cpu(es->s_blocks_count))) {
+	err = generic_check_addressable(sb->s_blocksize_bits,
+					le32_to_cpu(es->s_blocks_count));
+	if (err) {
 		ext3_msg(sb, KERN_ERR,
 			"error: filesystem is too large to mount safely");
 		if (sizeof(sector_t) < 8)
 			ext3_msg(sb, KERN_ERR,
 				"error: CONFIG_LBDAF not enabled");
+		ret = err;
 		goto failed_mount;
 	}