All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
@ 2011-03-28 14:05 Tao Ma
  2011-03-28 14:13 ` Lukas Czerner
  2011-05-09  2:02 ` Ted Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Ma @ 2011-03-28 14:05 UTC (permalink / raw)
  To: linux-ext4; +Cc: Lukas Czerner

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;
-	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
  2011-03-28 14:05 [PATCH v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request Tao Ma
@ 2011-03-28 14:13 ` Lukas Czerner
  2011-05-09  2:02 ` Ted Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Lukas Czerner @ 2011-03-28 14:13 UTC (permalink / raw)
  To: Tao Ma; +Cc: linux-ext4, Lukas Czerner

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
  2011-03-28 14:05 [PATCH v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request Tao Ma
  2011-03-28 14:13 ` Lukas Czerner
@ 2011-05-09  2:02 ` Ted Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2011-05-09  2:02 UTC (permalink / raw)
  To: Tao Ma; +Cc: linux-ext4, Lukas Czerner

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-09  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28 14:05 [PATCH v2] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request Tao Ma
2011-03-28 14:13 ` Lukas Czerner
2011-05-09  2:02 ` Ted Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.