linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
@ 2011-03-28  7:50 Tao Ma
  2011-03-28 12:33 ` Lukas Czerner
  0 siblings, 1 reply; 4+ messages in thread
From: Tao Ma @ 2011-03-28  7:50 UTC (permalink / raw)
  To: linux-ext4

From: Tao Ma <boyu.mt@taobao.com>

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

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
 fs/ext4/super.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2d1378f..37448a7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2953,11 +2953,6 @@ static int ext4_register_li_request(struct super_block *sb,
 		return 0;
 	}
 
-	if (first_not_zeroed == ngroups) {
-		sbi->s_li_request = NULL;
-		return 0;
-	}

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

* Re: [PATCH] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
  2011-03-28  7:50 [PATCH] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request Tao Ma
@ 2011-03-28 12:33 ` Lukas Czerner
  2011-03-28 12:41   ` Lukas Czerner
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2011-03-28 12:33 UTC (permalink / raw)
  To: Tao Ma; +Cc: linux-ext4

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.
> 
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
> ---
>  fs/ext4/super.c |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 2d1378f..37448a7 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -2953,11 +2953,6 @@ static int ext4_register_li_request(struct super_block *sb,
>  		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)
>  		return -ENOMEM;
> 

Patch looks good.

Thanks!
-Lukas

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

* Re: [PATCH] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
  2011-03-28 12:33 ` Lukas Czerner
@ 2011-03-28 12:41   ` Lukas Czerner
  2011-03-28 13:58     ` Tao Ma
  0 siblings, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2011-03-28 12:41 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: Tao Ma, linux-ext4

On Mon, 28 Mar 2011, Lukas Czerner wrote:

> 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.
> > 
> > Signed-off-by: Tao Ma <boyu.mt@taobao.com>
> > ---
> >  fs/ext4/super.c |    5 -----
> >  1 files changed, 0 insertions(+), 5 deletions(-)
> > 
> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > index 2d1378f..37448a7 100644
> > --- a/fs/ext4/super.c
> > +++ b/fs/ext4/super.c
> > @@ -2953,11 +2953,6 @@ static int ext4_register_li_request(struct super_block *sb,
> >  		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)
> >  		return -ENOMEM;
> > 
> 
> Patch looks good.
> 
> Thanks!
> -Lukas

Just one tiny thing, we do not even need to set
sbi->s_li_request = NULL since it is NULL already and we check that
in the beginning of the function.

Thanks!
-Lukas

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

* Re: [PATCH] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request.
  2011-03-28 12:41   ` Lukas Czerner
@ 2011-03-28 13:58     ` Tao Ma
  0 siblings, 0 replies; 4+ messages in thread
From: Tao Ma @ 2011-03-28 13:58 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: linux-ext4

On 03/28/2011 08:41 PM, Lukas Czerner wrote:
> On Mon, 28 Mar 2011, Lukas Czerner wrote:
> 
>> 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.
>>>
>>> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
>>> ---
>>>  fs/ext4/super.c |    5 -----
>>>  1 files changed, 0 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>>> index 2d1378f..37448a7 100644
>>> --- a/fs/ext4/super.c
>>> +++ b/fs/ext4/super.c
>>> @@ -2953,11 +2953,6 @@ static int ext4_register_li_request(struct super_block *sb,
>>>  		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)
>>>  		return -ENOMEM;
>>>
>>
>> Patch looks good.
>>
>> Thanks!
>> -Lukas
> 
> Just one tiny thing, we do not even need to set
> sbi->s_li_request = NULL since it is NULL already and we check that
> in the beginning of the function.
yeah, another patch will be sent for this. thanks for the review. ;)

Regards,
Tao

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

end of thread, other threads:[~2011-03-28 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28  7:50 [PATCH] ext4: Remove redundant check for first_not_zeroed in ext4_register_li_request Tao Ma
2011-03-28 12:33 ` Lukas Czerner
2011-03-28 12:41   ` Lukas Czerner
2011-03-28 13:58     ` Tao Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).