All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix max_retries _show and _store functions
@ 2017-01-03 17:53 Carlos Maiolino
  2017-01-03 18:19 ` Eric Sandeen
  2017-01-04  5:58 ` Darrick J. Wong
  0 siblings, 2 replies; 5+ messages in thread
From: Carlos Maiolino @ 2017-01-03 17:53 UTC (permalink / raw)
  To: linux-xfs

max_retries _show and _store functions should test against cfg->max_retries,
not cfg->retry_timeout

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
 fs/xfs/xfs_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
index 276d302..de6195e 100644
--- a/fs/xfs/xfs_sysfs.c
+++ b/fs/xfs/xfs_sysfs.c
@@ -396,7 +396,7 @@ max_retries_show(
 	int		retries;
 	struct xfs_error_cfg *cfg = to_error_cfg(kobject);
 
-	if (cfg->retry_timeout == XFS_ERR_RETRY_FOREVER)
+	if (cfg->max_retries == XFS_ERR_RETRY_FOREVER)
 		retries = -1;
 	else
 		retries = cfg->max_retries;
@@ -422,7 +422,7 @@ max_retries_store(
 		return -EINVAL;
 
 	if (val == -1)
-		cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
+		cfg->max_retries = XFS_ERR_RETRY_FOREVER;
 	else
 		cfg->max_retries = val;
 	return count;
-- 
2.9.3


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

* Re: [PATCH] Fix max_retries _show and _store functions
  2017-01-03 17:53 [PATCH] Fix max_retries _show and _store functions Carlos Maiolino
@ 2017-01-03 18:19 ` Eric Sandeen
  2017-01-04 10:58   ` Carlos Maiolino
  2017-01-04  5:58 ` Darrick J. Wong
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2017-01-03 18:19 UTC (permalink / raw)
  To: Carlos Maiolino, linux-xfs

On 1/3/17 11:53 AM, Carlos Maiolino wrote:
> max_retries _show and _store functions should test against cfg->max_retries,
> not cfg->retry_timeout
> 
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>

Whoever made those mistakes should be very ashamed.  ;)
I guess it was a cut and paste error.  :(

This should probably cc: stable, too.

Thanks,

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  fs/xfs/xfs_sysfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index 276d302..de6195e 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -396,7 +396,7 @@ max_retries_show(
>  	int		retries;
>  	struct xfs_error_cfg *cfg = to_error_cfg(kobject);
>  
> -	if (cfg->retry_timeout == XFS_ERR_RETRY_FOREVER)
> +	if (cfg->max_retries == XFS_ERR_RETRY_FOREVER)
>  		retries = -1;
>  	else
>  		retries = cfg->max_retries;
> @@ -422,7 +422,7 @@ max_retries_store(
>  		return -EINVAL;
>  
>  	if (val == -1)
> -		cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
> +		cfg->max_retries = XFS_ERR_RETRY_FOREVER;
>  	else
>  		cfg->max_retries = val;
>  	return count;
> 

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

* Re: [PATCH] Fix max_retries _show and _store functions
  2017-01-03 17:53 [PATCH] Fix max_retries _show and _store functions Carlos Maiolino
  2017-01-03 18:19 ` Eric Sandeen
@ 2017-01-04  5:58 ` Darrick J. Wong
  1 sibling, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2017-01-04  5:58 UTC (permalink / raw)
  To: Carlos Maiolino; +Cc: linux-xfs

On Tue, Jan 03, 2017 at 06:53:31PM +0100, Carlos Maiolino wrote:
> max_retries _show and _store functions should test against cfg->max_retries,
> not cfg->retry_timeout
> 
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
>  fs/xfs/xfs_sysfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index 276d302..de6195e 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -396,7 +396,7 @@ max_retries_show(
>  	int		retries;
>  	struct xfs_error_cfg *cfg = to_error_cfg(kobject);
>  
> -	if (cfg->retry_timeout == XFS_ERR_RETRY_FOREVER)
> +	if (cfg->max_retries == XFS_ERR_RETRY_FOREVER)
>  		retries = -1;
>  	else
>  		retries = cfg->max_retries;
> @@ -422,7 +422,7 @@ max_retries_store(
>  		return -EINVAL;
>  
>  	if (val == -1)
> -		cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
> +		cfg->max_retries = XFS_ERR_RETRY_FOREVER;

Applied, thanks.

--D

>  	else
>  		cfg->max_retries = val;
>  	return count;
> -- 
> 2.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] Fix max_retries _show and _store functions
  2017-01-03 18:19 ` Eric Sandeen
@ 2017-01-04 10:58   ` Carlos Maiolino
  2017-01-04 15:46     ` Eric Sandeen
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Maiolino @ 2017-01-04 10:58 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Tue, Jan 03, 2017 at 12:19:53PM -0600, Eric Sandeen wrote:
> On 1/3/17 11:53 AM, Carlos Maiolino wrote:
> > max_retries _show and _store functions should test against cfg->max_retries,
> > not cfg->retry_timeout
> > 
> > Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> 
> Whoever made those mistakes should be very ashamed.  ;)
> I guess it was a cut and paste error.  :(
> 
> This should probably cc: stable, too.

Yeah, I believe so,

maybe if I just forward the patch to stable might work? 
> 
> Thanks,
> 
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> 
> > ---
> >  fs/xfs/xfs_sysfs.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> > index 276d302..de6195e 100644
> > --- a/fs/xfs/xfs_sysfs.c
> > +++ b/fs/xfs/xfs_sysfs.c
> > @@ -396,7 +396,7 @@ max_retries_show(
> >  	int		retries;
> >  	struct xfs_error_cfg *cfg = to_error_cfg(kobject);
> >  
> > -	if (cfg->retry_timeout == XFS_ERR_RETRY_FOREVER)
> > +	if (cfg->max_retries == XFS_ERR_RETRY_FOREVER)
> >  		retries = -1;
> >  	else
> >  		retries = cfg->max_retries;
> > @@ -422,7 +422,7 @@ max_retries_store(
> >  		return -EINVAL;
> >  
> >  	if (val == -1)
> > -		cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
> > +		cfg->max_retries = XFS_ERR_RETRY_FOREVER;
> >  	else
> >  		cfg->max_retries = val;
> >  	return count;
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

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

* Re: [PATCH] Fix max_retries _show and _store functions
  2017-01-04 10:58   ` Carlos Maiolino
@ 2017-01-04 15:46     ` Eric Sandeen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2017-01-04 15:46 UTC (permalink / raw)
  To: linux-xfs

On 1/4/17 4:58 AM, Carlos Maiolino wrote:
> On Tue, Jan 03, 2017 at 12:19:53PM -0600, Eric Sandeen wrote:
>> On 1/3/17 11:53 AM, Carlos Maiolino wrote:
>>> max_retries _show and _store functions should test against cfg->max_retries,
>>> not cfg->retry_timeout
>>>
>>> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
>>
>> Whoever made those mistakes should be very ashamed.  ;)
>> I guess it was a cut and paste error.  :(
>>
>> This should probably cc: stable, too.
> 
> Yeah, I believe so,
> 
> maybe if I just forward the patch to stable might work? 

if cc: stable gets added when it's committed, that'll suffice.

-Eric

>>
>> Thanks,
>>
>> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
>>
>>> ---
>>>  fs/xfs/xfs_sysfs.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
>>> index 276d302..de6195e 100644
>>> --- a/fs/xfs/xfs_sysfs.c
>>> +++ b/fs/xfs/xfs_sysfs.c
>>> @@ -396,7 +396,7 @@ max_retries_show(
>>>  	int		retries;
>>>  	struct xfs_error_cfg *cfg = to_error_cfg(kobject);
>>>  
>>> -	if (cfg->retry_timeout == XFS_ERR_RETRY_FOREVER)
>>> +	if (cfg->max_retries == XFS_ERR_RETRY_FOREVER)
>>>  		retries = -1;
>>>  	else
>>>  		retries = cfg->max_retries;
>>> @@ -422,7 +422,7 @@ max_retries_store(
>>>  		return -EINVAL;
>>>  
>>>  	if (val == -1)
>>> -		cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
>>> +		cfg->max_retries = XFS_ERR_RETRY_FOREVER;
>>>  	else
>>>  		cfg->max_retries = val;
>>>  	return count;
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

end of thread, other threads:[~2017-01-04 15:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 17:53 [PATCH] Fix max_retries _show and _store functions Carlos Maiolino
2017-01-03 18:19 ` Eric Sandeen
2017-01-04 10:58   ` Carlos Maiolino
2017-01-04 15:46     ` Eric Sandeen
2017-01-04  5:58 ` Darrick J. Wong

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.