From: Carlos Maiolino Date: Wed, 4 Jan 2017 04:34:17 +0000 (-0800) Subject: xfs: fix max_retries _show and _store functions X-Git-Tag: v4.1.12-104.0.20170618_1145~219 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=13778afab7ca5d396469fe6d03981d2bcb497820;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: Eric Sandeen Signed-off-by: Darrick J. Wong (cherry picked from commit ff97f2399edac1e0fb3fa7851d5fbcbdf04717cf) Orabug: 26130728 Signed-off-by: Kirtikar Kashyap Reviewed-by: Jack Vogel --- diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c index 7d5ad9468475..93b65290b7f9 100644 --- a/fs/xfs/xfs_sysfs.c +++ b/fs/xfs/xfs_sysfs.c @@ -305,7 +305,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; @@ -331,7 +331,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;