Skip to contentSkip to conversation

Fix max_retries _show and _store functions

PATCH Applied Carlos Maiolino 3 participants 5 messages Jan 3, 2017 – Jan 4, 2017 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix max_retries _show and _store functions

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

---
 fs/xfs/xfs_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/xfs_sysfs.c +2 -2
index 276d302..de6195e 100644
@@ -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;
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Carlos Maiolino

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

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

This should probably cc: stable, too.

Thanks,

Quoted 27 lines
---
 fs/xfs/xfs_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/xfs_sysfs.c +2 -2
index 276d302..de6195e 100644
@@ -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 lore raw
Quoted 10 lines · Eric Sandeen
Quoted 4 lines · Carlos Maiolino

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

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?

Quoted 36 lines

Thanks,

Quoted 19 lines
---
 fs/xfs/xfs_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/xfs_sysfs.c +1 -1
index 276d302..de6195e 100644
@@ -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;

fs/xfs/xfs_sysfs.c max_retries_store( · line 428

Quoted 8 lines
fs/xfs/xfs_sysfs.c +1 -1
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Carlos
#3 lore raw
Quoted 7 lines · Carlos Maiolino
Quoted 6 lines · Eric Sandeen
Quoted 4 lines · Carlos Maiolino

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

Quoted 8 lines
Quoted 4 lines

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

Quoted 37 lines
Quoted 36 lines

Thanks,

Quoted 19 lines
---
 fs/xfs/xfs_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/xfs_sysfs.c +1 -1
index 276d302..de6195e 100644
@@ -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;

fs/xfs/xfs_sysfs.c max_retries_store( · line 428

Quoted 8 lines
fs/xfs/xfs_sysfs.c +1 -1
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Carlos Maiolino
Quoted 22 lines · Carlos Maiolino

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

---
 fs/xfs/xfs_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/xfs/xfs_sysfs.c +1 -1
index 276d302..de6195e 100644
@@ -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;

fs/xfs/xfs_sysfs.c max_retries_store( · line 425

Quoted 5 lines
fs/xfs/xfs_sysfs.c +1 -1
@@ -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

Quoted 10 lines
fs/xfs/xfs_sysfs.c +0 -0
 	else
 		cfg->max_retries = val;
 	return count;
Signature · 6 lines
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html