aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 304b63ac78cf..9e7accc68b4b 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -158,6 +158,8 @@ enum {
158 Opt_user_xattr, 158 Opt_user_xattr,
159 Opt_nouser_xattr, 159 Opt_nouser_xattr,
160 Opt_inode64, 160 Opt_inode64,
161 Opt_acl,
162 Opt_noacl,
161 Opt_err, 163 Opt_err,
162}; 164};
163 165
@@ -180,6 +182,8 @@ static const match_table_t tokens = {
180 {Opt_user_xattr, "user_xattr"}, 182 {Opt_user_xattr, "user_xattr"},
181 {Opt_nouser_xattr, "nouser_xattr"}, 183 {Opt_nouser_xattr, "nouser_xattr"},
182 {Opt_inode64, "inode64"}, 184 {Opt_inode64, "inode64"},
185 {Opt_acl, "acl"},
186 {Opt_noacl, "noacl"},
183 {Opt_err, NULL} 187 {Opt_err, NULL}
184}; 188};
185 189
@@ -466,6 +470,8 @@ unlock_osb:
466 if (!ret) { 470 if (!ret) {
467 /* Only save off the new mount options in case of a successful 471 /* Only save off the new mount options in case of a successful
468 * remount. */ 472 * remount. */
473 if (!(osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_XATTR))
474 parsed_options.mount_opt &= ~OCFS2_MOUNT_POSIX_ACL;
469 osb->s_mount_opt = parsed_options.mount_opt; 475 osb->s_mount_opt = parsed_options.mount_opt;
470 osb->s_atime_quantum = parsed_options.atime_quantum; 476 osb->s_atime_quantum = parsed_options.atime_quantum;
471 osb->preferred_slot = parsed_options.slot; 477 osb->preferred_slot = parsed_options.slot;
@@ -651,6 +657,10 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
651 } 657 }
652 brelse(bh); 658 brelse(bh);
653 bh = NULL; 659 bh = NULL;
660
661 if (!(osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_XATTR))
662 parsed_options.mount_opt &= ~OCFS2_MOUNT_POSIX_ACL;
663
654 osb->s_mount_opt = parsed_options.mount_opt; 664 osb->s_mount_opt = parsed_options.mount_opt;
655 osb->s_atime_quantum = parsed_options.atime_quantum; 665 osb->s_atime_quantum = parsed_options.atime_quantum;
656 osb->preferred_slot = parsed_options.slot; 666 osb->preferred_slot = parsed_options.slot;
@@ -664,6 +674,9 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
664 674
665 sb->s_magic = OCFS2_SUPER_MAGIC; 675 sb->s_magic = OCFS2_SUPER_MAGIC;
666 676
677 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
678 ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
679
667 /* Hard readonly mode only if: bdev_read_only, MS_RDONLY, 680 /* Hard readonly mode only if: bdev_read_only, MS_RDONLY,
668 * heartbeat=none */ 681 * heartbeat=none */
669 if (bdev_read_only(sb->s_bdev)) { 682 if (bdev_read_only(sb->s_bdev)) {
@@ -945,6 +958,19 @@ static int ocfs2_parse_options(struct super_block *sb,
945 case Opt_inode64: 958 case Opt_inode64:
946 mopt->mount_opt |= OCFS2_MOUNT_INODE64; 959 mopt->mount_opt |= OCFS2_MOUNT_INODE64;
947 break; 960 break;
961#ifdef CONFIG_OCFS2_FS_POSIX_ACL
962 case Opt_acl:
963 mopt->mount_opt |= OCFS2_MOUNT_POSIX_ACL;
964 break;
965 case Opt_noacl:
966 mopt->mount_opt &= ~OCFS2_MOUNT_POSIX_ACL;
967 break;
968#else
969 case Opt_acl:
970 case Opt_noacl:
971 printk(KERN_INFO "ocfs2 (no)acl options not supported\n");
972 break;
973#endif
948 default: 974 default:
949 mlog(ML_ERROR, 975 mlog(ML_ERROR,
950 "Unrecognized mount option \"%s\" " 976 "Unrecognized mount option \"%s\" "
@@ -1017,6 +1043,13 @@ static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
1017 if (opts & OCFS2_MOUNT_INODE64) 1043 if (opts & OCFS2_MOUNT_INODE64)
1018 seq_printf(s, ",inode64"); 1044 seq_printf(s, ",inode64");
1019 1045
1046#ifdef CONFIG_OCFS2_FS_POSIX_ACL
1047 if (opts & OCFS2_MOUNT_POSIX_ACL)
1048 seq_printf(s, ",acl");
1049 else
1050 seq_printf(s, ",noacl");
1051#endif
1052
1020 return 0; 1053 return 0;
1021} 1054}
1022 1055