Skip to content

Commit

Permalink
xfs: fix max_retries _show and _store functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cmaiolino authored and djwong committed Jan 4, 2017
1 parent 721a0ed commit ff97f23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/xfs/xfs_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit ff97f23

Please sign in to comment.