diff mbox series

[v2,1/2] xfs: rename variable mp to parsing_mp

Message ID 20210224214323.394286-3-preichl@redhat.com (mailing list archive)
State Superseded, archived
Headers show
Series xfs: Skip repetitive warnings about mount options | expand

Commit Message

Pavel Reichl Feb. 24, 2021, 9:43 p.m. UTC
Rename mp variable to parsisng_mp so it is easy to distinguish
between current mount point handle and handle for mount point
which mount options are being parsed.

Suggested-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
 fs/xfs/xfs_super.c | 102 ++++++++++++++++++++++-----------------------
 1 file changed, 51 insertions(+), 51 deletions(-)

Comments

Darrick J. Wong Feb. 25, 2021, 2:40 a.m. UTC | #1
On Wed, Feb 24, 2021 at 10:43:22PM +0100, Pavel Reichl wrote:
> Rename mp variable to parsisng_mp so it is easy to distinguish
> between current mount point handle and handle for mount point
> which mount options are being parsed.
> 
> Suggested-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Pavel Reichl <preichl@redhat.com>

Seems reasonable...

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_super.c | 102 ++++++++++++++++++++++-----------------------
>  1 file changed, 51 insertions(+), 51 deletions(-)
> 
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 813be879a5e5..7e281d1139dc 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1165,7 +1165,7 @@ xfs_fs_parse_param(
>  	struct fs_context	*fc,
>  	struct fs_parameter	*param)
>  {
> -	struct xfs_mount	*mp = fc->s_fs_info;
> +	struct xfs_mount	*parsing_mp = fc->s_fs_info;
>  	struct fs_parse_result	result;
>  	int			size = 0;
>  	int			opt;
> @@ -1176,142 +1176,142 @@ xfs_fs_parse_param(
>  
>  	switch (opt) {
>  	case Opt_logbufs:
> -		mp->m_logbufs = result.uint_32;
> +		parsing_mp->m_logbufs = result.uint_32;
>  		return 0;
>  	case Opt_logbsize:
> -		if (suffix_kstrtoint(param->string, 10, &mp->m_logbsize))
> +		if (suffix_kstrtoint(param->string, 10, &parsing_mp->m_logbsize))
>  			return -EINVAL;
>  		return 0;
>  	case Opt_logdev:
> -		kfree(mp->m_logname);
> -		mp->m_logname = kstrdup(param->string, GFP_KERNEL);
> -		if (!mp->m_logname)
> +		kfree(parsing_mp->m_logname);
> +		parsing_mp->m_logname = kstrdup(param->string, GFP_KERNEL);
> +		if (!parsing_mp->m_logname)
>  			return -ENOMEM;
>  		return 0;
>  	case Opt_rtdev:
> -		kfree(mp->m_rtname);
> -		mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
> -		if (!mp->m_rtname)
> +		kfree(parsing_mp->m_rtname);
> +		parsing_mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
> +		if (!parsing_mp->m_rtname)
>  			return -ENOMEM;
>  		return 0;
>  	case Opt_allocsize:
>  		if (suffix_kstrtoint(param->string, 10, &size))
>  			return -EINVAL;
> -		mp->m_allocsize_log = ffs(size) - 1;
> -		mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
> +		parsing_mp->m_allocsize_log = ffs(size) - 1;
> +		parsing_mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
>  		return 0;
>  	case Opt_grpid:
>  	case Opt_bsdgroups:
> -		mp->m_flags |= XFS_MOUNT_GRPID;
> +		parsing_mp->m_flags |= XFS_MOUNT_GRPID;
>  		return 0;
>  	case Opt_nogrpid:
>  	case Opt_sysvgroups:
> -		mp->m_flags &= ~XFS_MOUNT_GRPID;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_GRPID;
>  		return 0;
>  	case Opt_wsync:
> -		mp->m_flags |= XFS_MOUNT_WSYNC;
> +		parsing_mp->m_flags |= XFS_MOUNT_WSYNC;
>  		return 0;
>  	case Opt_norecovery:
> -		mp->m_flags |= XFS_MOUNT_NORECOVERY;
> +		parsing_mp->m_flags |= XFS_MOUNT_NORECOVERY;
>  		return 0;
>  	case Opt_noalign:
> -		mp->m_flags |= XFS_MOUNT_NOALIGN;
> +		parsing_mp->m_flags |= XFS_MOUNT_NOALIGN;
>  		return 0;
>  	case Opt_swalloc:
> -		mp->m_flags |= XFS_MOUNT_SWALLOC;
> +		parsing_mp->m_flags |= XFS_MOUNT_SWALLOC;
>  		return 0;
>  	case Opt_sunit:
> -		mp->m_dalign = result.uint_32;
> +		parsing_mp->m_dalign = result.uint_32;
>  		return 0;
>  	case Opt_swidth:
> -		mp->m_swidth = result.uint_32;
> +		parsing_mp->m_swidth = result.uint_32;
>  		return 0;
>  	case Opt_inode32:
> -		mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
> +		parsing_mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
>  		return 0;
>  	case Opt_inode64:
> -		mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
>  		return 0;
>  	case Opt_nouuid:
> -		mp->m_flags |= XFS_MOUNT_NOUUID;
> +		parsing_mp->m_flags |= XFS_MOUNT_NOUUID;
>  		return 0;
>  	case Opt_largeio:
> -		mp->m_flags |= XFS_MOUNT_LARGEIO;
> +		parsing_mp->m_flags |= XFS_MOUNT_LARGEIO;
>  		return 0;
>  	case Opt_nolargeio:
> -		mp->m_flags &= ~XFS_MOUNT_LARGEIO;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_LARGEIO;
>  		return 0;
>  	case Opt_filestreams:
> -		mp->m_flags |= XFS_MOUNT_FILESTREAMS;
> +		parsing_mp->m_flags |= XFS_MOUNT_FILESTREAMS;
>  		return 0;
>  	case Opt_noquota:
> -		mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
> -		mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
> -		mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
> +		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
> +		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
> +		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
>  		return 0;
>  	case Opt_quota:
>  	case Opt_uquota:
>  	case Opt_usrquota:
> -		mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
> +		parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
>  				 XFS_UQUOTA_ENFD);
>  		return 0;
>  	case Opt_qnoenforce:
>  	case Opt_uqnoenforce:
> -		mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
> -		mp->m_qflags &= ~XFS_UQUOTA_ENFD;
> +		parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
> +		parsing_mp->m_qflags &= ~XFS_UQUOTA_ENFD;
>  		return 0;
>  	case Opt_pquota:
>  	case Opt_prjquota:
> -		mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
> +		parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
>  				 XFS_PQUOTA_ENFD);
>  		return 0;
>  	case Opt_pqnoenforce:
> -		mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
> -		mp->m_qflags &= ~XFS_PQUOTA_ENFD;
> +		parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
> +		parsing_mp->m_qflags &= ~XFS_PQUOTA_ENFD;
>  		return 0;
>  	case Opt_gquota:
>  	case Opt_grpquota:
> -		mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
> +		parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
>  				 XFS_GQUOTA_ENFD);
>  		return 0;
>  	case Opt_gqnoenforce:
> -		mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
> -		mp->m_qflags &= ~XFS_GQUOTA_ENFD;
> +		parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
> +		parsing_mp->m_qflags &= ~XFS_GQUOTA_ENFD;
>  		return 0;
>  	case Opt_discard:
> -		mp->m_flags |= XFS_MOUNT_DISCARD;
> +		parsing_mp->m_flags |= XFS_MOUNT_DISCARD;
>  		return 0;
>  	case Opt_nodiscard:
> -		mp->m_flags &= ~XFS_MOUNT_DISCARD;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_DISCARD;
>  		return 0;
>  #ifdef CONFIG_FS_DAX
>  	case Opt_dax:
> -		xfs_mount_set_dax_mode(mp, XFS_DAX_ALWAYS);
> +		xfs_mount_set_dax_mode(parsing_mp, XFS_DAX_ALWAYS);
>  		return 0;
>  	case Opt_dax_enum:
> -		xfs_mount_set_dax_mode(mp, result.uint_32);
> +		xfs_mount_set_dax_mode(parsing_mp, result.uint_32);
>  		return 0;
>  #endif
>  	/* Following mount options will be removed in September 2025 */
>  	case Opt_ikeep:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags |= XFS_MOUNT_IKEEP;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags |= XFS_MOUNT_IKEEP;
>  		return 0;
>  	case Opt_noikeep:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags &= ~XFS_MOUNT_IKEEP;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags &= ~XFS_MOUNT_IKEEP;
>  		return 0;
>  	case Opt_attr2:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags |= XFS_MOUNT_ATTR2;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags |= XFS_MOUNT_ATTR2;
>  		return 0;
>  	case Opt_noattr2:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags &= ~XFS_MOUNT_ATTR2;
> -		mp->m_flags |= XFS_MOUNT_NOATTR2;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags &= ~XFS_MOUNT_ATTR2;
> +		parsing_mp->m_flags |= XFS_MOUNT_NOATTR2;
>  		return 0;
>  	default:
> -		xfs_warn(mp, "unknown mount option [%s].", param->key);
> +		xfs_warn(parsing_mp, "unknown mount option [%s].", param->key);
>  		return -EINVAL;
>  	}
>  
> -- 
> 2.29.2
>
Carlos Maiolino March 9, 2021, 11:42 a.m. UTC | #2
On Wed, Feb 24, 2021 at 10:43:22PM +0100, Pavel Reichl wrote:
> Rename mp variable to parsisng_mp so it is easy to distinguish
> between current mount point handle and handle for mount point
> which mount options are being parsed.
> 
> Suggested-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> ---
>  fs/xfs/xfs_super.c | 102 ++++++++++++++++++++++-----------------------
>  1 file changed, 51 insertions(+), 51 deletions(-)

Looks good,
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> 
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 813be879a5e5..7e281d1139dc 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1165,7 +1165,7 @@ xfs_fs_parse_param(
>  	struct fs_context	*fc,
>  	struct fs_parameter	*param)
>  {
> -	struct xfs_mount	*mp = fc->s_fs_info;
> +	struct xfs_mount	*parsing_mp = fc->s_fs_info;
>  	struct fs_parse_result	result;
>  	int			size = 0;
>  	int			opt;
> @@ -1176,142 +1176,142 @@ xfs_fs_parse_param(
>  
>  	switch (opt) {
>  	case Opt_logbufs:
> -		mp->m_logbufs = result.uint_32;
> +		parsing_mp->m_logbufs = result.uint_32;
>  		return 0;
>  	case Opt_logbsize:
> -		if (suffix_kstrtoint(param->string, 10, &mp->m_logbsize))
> +		if (suffix_kstrtoint(param->string, 10, &parsing_mp->m_logbsize))
>  			return -EINVAL;
>  		return 0;
>  	case Opt_logdev:
> -		kfree(mp->m_logname);
> -		mp->m_logname = kstrdup(param->string, GFP_KERNEL);
> -		if (!mp->m_logname)
> +		kfree(parsing_mp->m_logname);
> +		parsing_mp->m_logname = kstrdup(param->string, GFP_KERNEL);
> +		if (!parsing_mp->m_logname)
>  			return -ENOMEM;
>  		return 0;
>  	case Opt_rtdev:
> -		kfree(mp->m_rtname);
> -		mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
> -		if (!mp->m_rtname)
> +		kfree(parsing_mp->m_rtname);
> +		parsing_mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
> +		if (!parsing_mp->m_rtname)
>  			return -ENOMEM;
>  		return 0;
>  	case Opt_allocsize:
>  		if (suffix_kstrtoint(param->string, 10, &size))
>  			return -EINVAL;
> -		mp->m_allocsize_log = ffs(size) - 1;
> -		mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
> +		parsing_mp->m_allocsize_log = ffs(size) - 1;
> +		parsing_mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
>  		return 0;
>  	case Opt_grpid:
>  	case Opt_bsdgroups:
> -		mp->m_flags |= XFS_MOUNT_GRPID;
> +		parsing_mp->m_flags |= XFS_MOUNT_GRPID;
>  		return 0;
>  	case Opt_nogrpid:
>  	case Opt_sysvgroups:
> -		mp->m_flags &= ~XFS_MOUNT_GRPID;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_GRPID;
>  		return 0;
>  	case Opt_wsync:
> -		mp->m_flags |= XFS_MOUNT_WSYNC;
> +		parsing_mp->m_flags |= XFS_MOUNT_WSYNC;
>  		return 0;
>  	case Opt_norecovery:
> -		mp->m_flags |= XFS_MOUNT_NORECOVERY;
> +		parsing_mp->m_flags |= XFS_MOUNT_NORECOVERY;
>  		return 0;
>  	case Opt_noalign:
> -		mp->m_flags |= XFS_MOUNT_NOALIGN;
> +		parsing_mp->m_flags |= XFS_MOUNT_NOALIGN;
>  		return 0;
>  	case Opt_swalloc:
> -		mp->m_flags |= XFS_MOUNT_SWALLOC;
> +		parsing_mp->m_flags |= XFS_MOUNT_SWALLOC;
>  		return 0;
>  	case Opt_sunit:
> -		mp->m_dalign = result.uint_32;
> +		parsing_mp->m_dalign = result.uint_32;
>  		return 0;
>  	case Opt_swidth:
> -		mp->m_swidth = result.uint_32;
> +		parsing_mp->m_swidth = result.uint_32;
>  		return 0;
>  	case Opt_inode32:
> -		mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
> +		parsing_mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
>  		return 0;
>  	case Opt_inode64:
> -		mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
>  		return 0;
>  	case Opt_nouuid:
> -		mp->m_flags |= XFS_MOUNT_NOUUID;
> +		parsing_mp->m_flags |= XFS_MOUNT_NOUUID;
>  		return 0;
>  	case Opt_largeio:
> -		mp->m_flags |= XFS_MOUNT_LARGEIO;
> +		parsing_mp->m_flags |= XFS_MOUNT_LARGEIO;
>  		return 0;
>  	case Opt_nolargeio:
> -		mp->m_flags &= ~XFS_MOUNT_LARGEIO;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_LARGEIO;
>  		return 0;
>  	case Opt_filestreams:
> -		mp->m_flags |= XFS_MOUNT_FILESTREAMS;
> +		parsing_mp->m_flags |= XFS_MOUNT_FILESTREAMS;
>  		return 0;
>  	case Opt_noquota:
> -		mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
> -		mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
> -		mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
> +		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
> +		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
> +		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
>  		return 0;
>  	case Opt_quota:
>  	case Opt_uquota:
>  	case Opt_usrquota:
> -		mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
> +		parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
>  				 XFS_UQUOTA_ENFD);
>  		return 0;
>  	case Opt_qnoenforce:
>  	case Opt_uqnoenforce:
> -		mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
> -		mp->m_qflags &= ~XFS_UQUOTA_ENFD;
> +		parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
> +		parsing_mp->m_qflags &= ~XFS_UQUOTA_ENFD;
>  		return 0;
>  	case Opt_pquota:
>  	case Opt_prjquota:
> -		mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
> +		parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
>  				 XFS_PQUOTA_ENFD);
>  		return 0;
>  	case Opt_pqnoenforce:
> -		mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
> -		mp->m_qflags &= ~XFS_PQUOTA_ENFD;
> +		parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
> +		parsing_mp->m_qflags &= ~XFS_PQUOTA_ENFD;
>  		return 0;
>  	case Opt_gquota:
>  	case Opt_grpquota:
> -		mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
> +		parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
>  				 XFS_GQUOTA_ENFD);
>  		return 0;
>  	case Opt_gqnoenforce:
> -		mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
> -		mp->m_qflags &= ~XFS_GQUOTA_ENFD;
> +		parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
> +		parsing_mp->m_qflags &= ~XFS_GQUOTA_ENFD;
>  		return 0;
>  	case Opt_discard:
> -		mp->m_flags |= XFS_MOUNT_DISCARD;
> +		parsing_mp->m_flags |= XFS_MOUNT_DISCARD;
>  		return 0;
>  	case Opt_nodiscard:
> -		mp->m_flags &= ~XFS_MOUNT_DISCARD;
> +		parsing_mp->m_flags &= ~XFS_MOUNT_DISCARD;
>  		return 0;
>  #ifdef CONFIG_FS_DAX
>  	case Opt_dax:
> -		xfs_mount_set_dax_mode(mp, XFS_DAX_ALWAYS);
> +		xfs_mount_set_dax_mode(parsing_mp, XFS_DAX_ALWAYS);
>  		return 0;
>  	case Opt_dax_enum:
> -		xfs_mount_set_dax_mode(mp, result.uint_32);
> +		xfs_mount_set_dax_mode(parsing_mp, result.uint_32);
>  		return 0;
>  #endif
>  	/* Following mount options will be removed in September 2025 */
>  	case Opt_ikeep:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags |= XFS_MOUNT_IKEEP;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags |= XFS_MOUNT_IKEEP;
>  		return 0;
>  	case Opt_noikeep:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags &= ~XFS_MOUNT_IKEEP;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags &= ~XFS_MOUNT_IKEEP;
>  		return 0;
>  	case Opt_attr2:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags |= XFS_MOUNT_ATTR2;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags |= XFS_MOUNT_ATTR2;
>  		return 0;
>  	case Opt_noattr2:
> -		xfs_warn(mp, "%s mount option is deprecated.", param->key);
> -		mp->m_flags &= ~XFS_MOUNT_ATTR2;
> -		mp->m_flags |= XFS_MOUNT_NOATTR2;
> +		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
> +		parsing_mp->m_flags &= ~XFS_MOUNT_ATTR2;
> +		parsing_mp->m_flags |= XFS_MOUNT_NOATTR2;
>  		return 0;
>  	default:
> -		xfs_warn(mp, "unknown mount option [%s].", param->key);
> +		xfs_warn(parsing_mp, "unknown mount option [%s].", param->key);
>  		return -EINVAL;
>  	}
>  
> -- 
> 2.29.2
>
diff mbox series

Patch

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 813be879a5e5..7e281d1139dc 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1165,7 +1165,7 @@  xfs_fs_parse_param(
 	struct fs_context	*fc,
 	struct fs_parameter	*param)
 {
-	struct xfs_mount	*mp = fc->s_fs_info;
+	struct xfs_mount	*parsing_mp = fc->s_fs_info;
 	struct fs_parse_result	result;
 	int			size = 0;
 	int			opt;
@@ -1176,142 +1176,142 @@  xfs_fs_parse_param(
 
 	switch (opt) {
 	case Opt_logbufs:
-		mp->m_logbufs = result.uint_32;
+		parsing_mp->m_logbufs = result.uint_32;
 		return 0;
 	case Opt_logbsize:
-		if (suffix_kstrtoint(param->string, 10, &mp->m_logbsize))
+		if (suffix_kstrtoint(param->string, 10, &parsing_mp->m_logbsize))
 			return -EINVAL;
 		return 0;
 	case Opt_logdev:
-		kfree(mp->m_logname);
-		mp->m_logname = kstrdup(param->string, GFP_KERNEL);
-		if (!mp->m_logname)
+		kfree(parsing_mp->m_logname);
+		parsing_mp->m_logname = kstrdup(param->string, GFP_KERNEL);
+		if (!parsing_mp->m_logname)
 			return -ENOMEM;
 		return 0;
 	case Opt_rtdev:
-		kfree(mp->m_rtname);
-		mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
-		if (!mp->m_rtname)
+		kfree(parsing_mp->m_rtname);
+		parsing_mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
+		if (!parsing_mp->m_rtname)
 			return -ENOMEM;
 		return 0;
 	case Opt_allocsize:
 		if (suffix_kstrtoint(param->string, 10, &size))
 			return -EINVAL;
-		mp->m_allocsize_log = ffs(size) - 1;
-		mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
+		parsing_mp->m_allocsize_log = ffs(size) - 1;
+		parsing_mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
 		return 0;
 	case Opt_grpid:
 	case Opt_bsdgroups:
-		mp->m_flags |= XFS_MOUNT_GRPID;
+		parsing_mp->m_flags |= XFS_MOUNT_GRPID;
 		return 0;
 	case Opt_nogrpid:
 	case Opt_sysvgroups:
-		mp->m_flags &= ~XFS_MOUNT_GRPID;
+		parsing_mp->m_flags &= ~XFS_MOUNT_GRPID;
 		return 0;
 	case Opt_wsync:
-		mp->m_flags |= XFS_MOUNT_WSYNC;
+		parsing_mp->m_flags |= XFS_MOUNT_WSYNC;
 		return 0;
 	case Opt_norecovery:
-		mp->m_flags |= XFS_MOUNT_NORECOVERY;
+		parsing_mp->m_flags |= XFS_MOUNT_NORECOVERY;
 		return 0;
 	case Opt_noalign:
-		mp->m_flags |= XFS_MOUNT_NOALIGN;
+		parsing_mp->m_flags |= XFS_MOUNT_NOALIGN;
 		return 0;
 	case Opt_swalloc:
-		mp->m_flags |= XFS_MOUNT_SWALLOC;
+		parsing_mp->m_flags |= XFS_MOUNT_SWALLOC;
 		return 0;
 	case Opt_sunit:
-		mp->m_dalign = result.uint_32;
+		parsing_mp->m_dalign = result.uint_32;
 		return 0;
 	case Opt_swidth:
-		mp->m_swidth = result.uint_32;
+		parsing_mp->m_swidth = result.uint_32;
 		return 0;
 	case Opt_inode32:
-		mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
+		parsing_mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
 		return 0;
 	case Opt_inode64:
-		mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
+		parsing_mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
 		return 0;
 	case Opt_nouuid:
-		mp->m_flags |= XFS_MOUNT_NOUUID;
+		parsing_mp->m_flags |= XFS_MOUNT_NOUUID;
 		return 0;
 	case Opt_largeio:
-		mp->m_flags |= XFS_MOUNT_LARGEIO;
+		parsing_mp->m_flags |= XFS_MOUNT_LARGEIO;
 		return 0;
 	case Opt_nolargeio:
-		mp->m_flags &= ~XFS_MOUNT_LARGEIO;
+		parsing_mp->m_flags &= ~XFS_MOUNT_LARGEIO;
 		return 0;
 	case Opt_filestreams:
-		mp->m_flags |= XFS_MOUNT_FILESTREAMS;
+		parsing_mp->m_flags |= XFS_MOUNT_FILESTREAMS;
 		return 0;
 	case Opt_noquota:
-		mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
-		mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
-		mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
+		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
+		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
+		parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
 		return 0;
 	case Opt_quota:
 	case Opt_uquota:
 	case Opt_usrquota:
-		mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
+		parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
 				 XFS_UQUOTA_ENFD);
 		return 0;
 	case Opt_qnoenforce:
 	case Opt_uqnoenforce:
-		mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
-		mp->m_qflags &= ~XFS_UQUOTA_ENFD;
+		parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
+		parsing_mp->m_qflags &= ~XFS_UQUOTA_ENFD;
 		return 0;
 	case Opt_pquota:
 	case Opt_prjquota:
-		mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
+		parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
 				 XFS_PQUOTA_ENFD);
 		return 0;
 	case Opt_pqnoenforce:
-		mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
-		mp->m_qflags &= ~XFS_PQUOTA_ENFD;
+		parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
+		parsing_mp->m_qflags &= ~XFS_PQUOTA_ENFD;
 		return 0;
 	case Opt_gquota:
 	case Opt_grpquota:
-		mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
+		parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
 				 XFS_GQUOTA_ENFD);
 		return 0;
 	case Opt_gqnoenforce:
-		mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
-		mp->m_qflags &= ~XFS_GQUOTA_ENFD;
+		parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
+		parsing_mp->m_qflags &= ~XFS_GQUOTA_ENFD;
 		return 0;
 	case Opt_discard:
-		mp->m_flags |= XFS_MOUNT_DISCARD;
+		parsing_mp->m_flags |= XFS_MOUNT_DISCARD;
 		return 0;
 	case Opt_nodiscard:
-		mp->m_flags &= ~XFS_MOUNT_DISCARD;
+		parsing_mp->m_flags &= ~XFS_MOUNT_DISCARD;
 		return 0;
 #ifdef CONFIG_FS_DAX
 	case Opt_dax:
-		xfs_mount_set_dax_mode(mp, XFS_DAX_ALWAYS);
+		xfs_mount_set_dax_mode(parsing_mp, XFS_DAX_ALWAYS);
 		return 0;
 	case Opt_dax_enum:
-		xfs_mount_set_dax_mode(mp, result.uint_32);
+		xfs_mount_set_dax_mode(parsing_mp, result.uint_32);
 		return 0;
 #endif
 	/* Following mount options will be removed in September 2025 */
 	case Opt_ikeep:
-		xfs_warn(mp, "%s mount option is deprecated.", param->key);
-		mp->m_flags |= XFS_MOUNT_IKEEP;
+		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
+		parsing_mp->m_flags |= XFS_MOUNT_IKEEP;
 		return 0;
 	case Opt_noikeep:
-		xfs_warn(mp, "%s mount option is deprecated.", param->key);
-		mp->m_flags &= ~XFS_MOUNT_IKEEP;
+		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
+		parsing_mp->m_flags &= ~XFS_MOUNT_IKEEP;
 		return 0;
 	case Opt_attr2:
-		xfs_warn(mp, "%s mount option is deprecated.", param->key);
-		mp->m_flags |= XFS_MOUNT_ATTR2;
+		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
+		parsing_mp->m_flags |= XFS_MOUNT_ATTR2;
 		return 0;
 	case Opt_noattr2:
-		xfs_warn(mp, "%s mount option is deprecated.", param->key);
-		mp->m_flags &= ~XFS_MOUNT_ATTR2;
-		mp->m_flags |= XFS_MOUNT_NOATTR2;
+		xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
+		parsing_mp->m_flags &= ~XFS_MOUNT_ATTR2;
+		parsing_mp->m_flags |= XFS_MOUNT_NOATTR2;
 		return 0;
 	default:
-		xfs_warn(mp, "unknown mount option [%s].", param->key);
+		xfs_warn(parsing_mp, "unknown mount option [%s].", param->key);
 		return -EINVAL;
 	}