summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 7b55464f6de0..debdb844ecb5 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -960,14 +960,6 @@ xfs_finish_flags(
}
/*
- * mkfs'ed attr2 will turn on attr2 mount unless explicitly
- * told by noattr2 to turn it off
- */
- if (xfs_sb_version_hasattr2(&mp->m_sb) &&
- !(mp->m_flags & XFS_MOUNT_NOATTR2))
- mp->m_flags |= XFS_MOUNT_ATTR2;
-
- /*
* prohibit r/w mounts of read-only filesystems
*/
if ((mp->m_sb.sb_flags & XFS_SBF_READONLY) && !ronly) {
@@ -1329,7 +1321,6 @@ xfs_fs_parse_param(
return 0;
case Opt_noattr2:
xfs_fs_warn_deprecated(fc, param, XFS_MOUNT_NOATTR2, true);
- parsing_mp->m_flags &= ~XFS_MOUNT_ATTR2;
parsing_mp->m_flags |= XFS_MOUNT_NOATTR2;
return 0;
default:
@@ -1353,6 +1344,13 @@ xfs_fs_validate_params(
return -EINVAL;
}
+ if ((mp->m_flags & (XFS_MOUNT_ATTR2|XFS_MOUNT_NOATTR2)) ==
+ (XFS_MOUNT_ATTR2|XFS_MOUNT_NOATTR2)) {
+ xfs_warn(mp, "attr2 and noattr2 cannot both be specified.");
+ return -EINVAL;
+ }
+
+
if ((mp->m_flags & XFS_MOUNT_NOALIGN) &&
(mp->m_dalign || mp->m_swidth)) {
xfs_warn(mp,