diff mbox series

ext2: Remove redundant check on s_inode_size

Message ID 1547561443-3411-1-git-send-email-liu.xiang6@zte.com.cn
State Not Applicable
Headers show
Series ext2: Remove redundant check on s_inode_size | expand

Commit Message

Liu Xiang Jan. 15, 2019, 2:10 p.m. UTC
The case of (EXT2_INODE_SIZE(sb) == 0) is included in
(sbi->s_inode_size < EXT2_GOOD_OLD_INODE_SIZE).
So there is no need to check again.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
---
 fs/ext2/super.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jan Kara Jan. 22, 2019, 10:38 a.m. UTC | #1
On Tue 15-01-19 22:10:43, Liu Xiang wrote:
> The case of (EXT2_INODE_SIZE(sb) == 0) is included in
> (sbi->s_inode_size < EXT2_GOOD_OLD_INODE_SIZE).
> So there is no need to check again.
> 
> Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>

Thanks for the cleanup. I have added it to my tree.

								Honza

> ---
>  fs/ext2/super.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 73b2d52..c71c2e3 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -1024,8 +1024,6 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
>  	sbi->s_frags_per_group = le32_to_cpu(es->s_frags_per_group);
>  	sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group);
>  
> -	if (EXT2_INODE_SIZE(sb) == 0)
> -		goto cantfind_ext2;
>  	sbi->s_inodes_per_block = sb->s_blocksize / EXT2_INODE_SIZE(sb);
>  	if (sbi->s_inodes_per_block == 0 || sbi->s_inodes_per_group == 0)
>  		goto cantfind_ext2;
> -- 
> 1.9.1
> 
>
diff mbox series

Patch

diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 73b2d52..c71c2e3 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1024,8 +1024,6 @@  static int ext2_fill_super(struct super_block *sb, void *data, int silent)
 	sbi->s_frags_per_group = le32_to_cpu(es->s_frags_per_group);
 	sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group);
 
-	if (EXT2_INODE_SIZE(sb) == 0)
-		goto cantfind_ext2;
 	sbi->s_inodes_per_block = sb->s_blocksize / EXT2_INODE_SIZE(sb);
 	if (sbi->s_inodes_per_block == 0 || sbi->s_inodes_per_group == 0)
 		goto cantfind_ext2;