diff options
author | Carlos Maiolino <cmaiolino@redhat.com> | 2017-01-09 10:39:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-12 05:39:45 -0500 |
commit | 1b9c2556809ad30ef8e28398d77b6b007e7be6c0 (patch) | |
tree | fe00f30e0e0ccbc1873bc89fd715075480815bd0 /fs | |
parent | 91192ae41e6f638d580bd0e3e6fd2d311eaf5adf (diff) |
xfs: fix max_retries _show and _store functions
commit ff97f2399edac1e0fb3fa7851d5fbcbdf04717cf upstream.
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>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c index 276d3023d60f..de6195e38910 100644 --- a/fs/xfs/xfs_sysfs.c +++ b/fs/xfs/xfs_sysfs.c | |||
@@ -396,7 +396,7 @@ max_retries_show( | |||
396 | int retries; | 396 | int retries; |
397 | struct xfs_error_cfg *cfg = to_error_cfg(kobject); | 397 | struct xfs_error_cfg *cfg = to_error_cfg(kobject); |
398 | 398 | ||
399 | if (cfg->retry_timeout == XFS_ERR_RETRY_FOREVER) | 399 | if (cfg->max_retries == XFS_ERR_RETRY_FOREVER) |
400 | retries = -1; | 400 | retries = -1; |
401 | else | 401 | else |
402 | retries = cfg->max_retries; | 402 | retries = cfg->max_retries; |
@@ -422,7 +422,7 @@ max_retries_store( | |||
422 | return -EINVAL; | 422 | return -EINVAL; |
423 | 423 | ||
424 | if (val == -1) | 424 | if (val == -1) |
425 | cfg->retry_timeout = XFS_ERR_RETRY_FOREVER; | 425 | cfg->max_retries = XFS_ERR_RETRY_FOREVER; |
426 | else | 426 | else |
427 | cfg->max_retries = val; | 427 | cfg->max_retries = val; |
428 | return count; | 428 | return count; |