diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index 46fc120fb9..1a570e8217 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -35,6 +35,7 @@ #include #include #include +#include char *zfs_vdev_scheduler = VDEV_SCHEDULER; static void *zfs_vdev_holder = VDEV_HOLDER; @@ -76,7 +77,7 @@ vdev_bdev_mode(int smode) ASSERT3S(smode & (FREAD | FWRITE), !=, 0); if ((smode & FREAD) && !(smode & FWRITE)) - mode = MS_RDONLY; + mode = SB_RDONLY; return (mode); } diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index bcdfa26b93..1060b093ca 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -66,6 +66,7 @@ #include #include #include +#include #include "zfs_comutil.h" enum { @@ -259,7 +260,7 @@ zfsvfs_parse_options(char *mntopts, vfs_t **vfsp) boolean_t zfs_is_readonly(zfsvfs_t *zfsvfs) { - return (!!(zfsvfs->z_sb->s_flags & MS_RDONLY)); + return (!!(zfsvfs->z_sb->s_flags & SB_RDONLY)); } /*ARGSUSED*/ @@ -353,15 +354,15 @@ acltype_changed_cb(void *arg, uint64_t newval) switch (newval) { case ZFS_ACLTYPE_OFF: zfsvfs->z_acl_type = ZFS_ACLTYPE_OFF; - zfsvfs->z_sb->s_flags &= ~MS_POSIXACL; + zfsvfs->z_sb->s_flags &= ~SB_POSIXACL; break; case ZFS_ACLTYPE_POSIXACL: #ifdef CONFIG_FS_POSIX_ACL zfsvfs->z_acl_type = ZFS_ACLTYPE_POSIXACL; - zfsvfs->z_sb->s_flags |= MS_POSIXACL; + zfsvfs->z_sb->s_flags |= SB_POSIXACL; #else zfsvfs->z_acl_type = ZFS_ACLTYPE_OFF; - zfsvfs->z_sb->s_flags &= ~MS_POSIXACL; + zfsvfs->z_sb->s_flags &= ~SB_POSIXACL; #endif /* CONFIG_FS_POSIX_ACL */ break; default: @@ -390,9 +391,9 @@ readonly_changed_cb(void *arg, uint64_t newval) return; if (newval) - sb->s_flags |= MS_RDONLY; + sb->s_flags |= SB_RDONLY; else - sb->s_flags &= ~MS_RDONLY; + sb->s_flags &= ~SB_RDONLY; } static void @@ -420,9 +421,9 @@ nbmand_changed_cb(void *arg, uint64_t newval) return; if (newval == TRUE) - sb->s_flags |= MS_MANDLOCK; + sb->s_flags |= SB_MANDLOCK; else - sb->s_flags &= ~MS_MANDLOCK; + sb->s_flags &= ~SB_MANDLOCK; } static void @@ -1763,8 +1764,8 @@ zfs_remount(struct super_block *sb, int *flags, zfs_mnt_t *zm) int error; if ((issnap || !spa_writeable(dmu_objset_spa(zfsvfs->z_os))) && - !(*flags & MS_RDONLY)) { - *flags |= MS_RDONLY; + !(*flags & SB_RDONLY)) { + *flags |= SB_RDONLY; return (EROFS); }