diff mbox

[v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.

Message ID 1301321153-3171-1-git-send-email-tm@tao.ma
State Accepted, archived
Headers show

Commit Message

Tao Ma March 28, 2011, 2:05 p.m. UTC
From: Tao Ma <boyu.mt@taobao.com>

We have checked first_not_zeroed == ngroups already above,
so remove this redundant check.

sbi->s_li_request = NULL above is also removed since
it is NULL already.

Cc: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
 fs/ext4/super.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

Comments

Lukas Czerner March 28, 2011, 2:13 p.m. UTC | #1
On Mon, 28 Mar 2011, Tao Ma wrote:

> From: Tao Ma <boyu.mt@taobao.com>
> 
> We have checked first_not_zeroed == ngroups already above,
> so remove this redundant check.
> 
> sbi->s_li_request = NULL above is also removed since
> it is NULL already.
> 
> Cc: Lukas Czerner <lczerner@redhat.com>
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
> ---
>  fs/ext4/super.c |    9 +--------
>  1 files changed, 1 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 2d1378f..c5a48dc 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -2948,15 +2948,8 @@ static int ext4_register_li_request(struct super_block *sb,
>  
>  	if (first_not_zeroed == ngroups ||
>  	    (sb->s_flags & MS_RDONLY) ||
> -	    !test_opt(sb, INIT_INODE_TABLE)) {
> -		sbi->s_li_request = NULL;
> +	    !test_opt(sb, INIT_INODE_TABLE))
>  		return 0;
> -	}
> -
> -	if (first_not_zeroed == ngroups) {
> -		sbi->s_li_request = NULL;
> -		return 0;
> -	}
>  
>  	elr = ext4_li_request_new(sb, first_not_zeroed);
>  	if (!elr)
> 

The patch look good, thanks for cleaning that up.

-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
Theodore Ts'o May 9, 2011, 2:02 a.m. UTC | #2
On Mon, Mar 28, 2011 at 10:05:53PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
> 
> We have checked first_not_zeroed == ngroups already above,
> so remove this redundant check.
> 
> sbi->s_li_request = NULL above is also removed since
> it is NULL already.
> 
> Cc: Lukas Czerner <lczerner@redhat.com>
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>

Thanks, added to the ext4 tree.

						- Ted
--
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
diff mbox

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2d1378f..c5a48dc 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2948,15 +2948,8 @@  static int ext4_register_li_request(struct super_block *sb,
 
 	if (first_not_zeroed == ngroups ||
 	    (sb->s_flags & MS_RDONLY) ||
-	    !test_opt(sb, INIT_INODE_TABLE)) {
-		sbi->s_li_request = NULL;
+	    !test_opt(sb, INIT_INODE_TABLE))
 		return 0;
-	}
-
-	if (first_not_zeroed == ngroups) {
-		sbi->s_li_request = NULL;
-		return 0;
-	}
 
 	elr = ext4_li_request_new(sb, first_not_zeroed);
 	if (!elr)