Browse Source

xfs: fix max_retries _show and _store functions

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

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Carlos Maiolino 8 years ago
parent
commit
ff97f2399e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      fs/xfs/xfs_sysfs.c

+ 2 - 2
fs/xfs/xfs_sysfs.c

@@ -396,7 +396,7 @@ max_retries_show(
 	int		retries;
 	int		retries;
 	struct xfs_error_cfg *cfg = to_error_cfg(kobject);
 	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;
 		retries = -1;
 	else
 	else
 		retries = cfg->max_retries;
 		retries = cfg->max_retries;
@@ -422,7 +422,7 @@ max_retries_store(
 		return -EINVAL;
 		return -EINVAL;
 
 
 	if (val == -1)
 	if (val == -1)
-		cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
+		cfg->max_retries = XFS_ERR_RETRY_FOREVER;
 	else
 	else
 		cfg->max_retries = val;
 		cfg->max_retries = val;
 	return count;
 	return count;