Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff97f239 authored by Carlos Maiolino's avatar Carlos Maiolino Committed by Darrick J. Wong
Browse files

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: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 721a0edf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;