diff --git a/kmod/src/kernelcompat.h b/kmod/src/kernelcompat.h index b24d5241..2df4ddfe 100644 --- a/kmod/src/kernelcompat.h +++ b/kmod/src/kernelcompat.h @@ -167,6 +167,17 @@ do { \ #define kc_bio_get_errno(bio) ({ (int)((void)(bio), _error_arg); }) #endif +/* + * v4.13-rc1-6-ge462ec50cb5f + * + * MS_* (mount) flags from should not be used in the kernel + * anymore from 4.x onwards. Instead, we need to use the SB_* (superblock) flags + */ +#ifndef SB_POSIXACL +#define SB_POSIXACL MS_POSIXACL +#define SB_I_VERSION MS_I_VERSION +#endif + #ifndef KC_SHRINKER_SHRINK #define KC_DEFINE_SHRINKER(name) struct shrinker name diff --git a/kmod/src/options.c b/kmod/src/options.c index 2a19a9e5..b7a1148b 100644 --- a/kmod/src/options.c +++ b/kmod/src/options.c @@ -169,7 +169,7 @@ static int parse_options(struct super_block *sb, char *options, struct scoutfs_m switch (token) { case Opt_acl: - sb->s_flags |= MS_POSIXACL; + sb->s_flags |= SB_POSIXACL; break; case Opt_data_prealloc_blocks: @@ -203,7 +203,7 @@ static int parse_options(struct super_block *sb, char *options, struct scoutfs_m break; case Opt_noacl: - sb->s_flags &= ~MS_POSIXACL; + sb->s_flags &= ~SB_POSIXACL; break; case Opt_orphan_scan_delay_ms: @@ -327,7 +327,7 @@ int scoutfs_options_show(struct seq_file *seq, struct dentry *root) { struct super_block *sb = root->d_sb; struct scoutfs_mount_options opts; - const bool is_acl = !!(sb->s_flags & MS_POSIXACL); + const bool is_acl = !!(sb->s_flags & SB_POSIXACL); scoutfs_options_read(sb, &opts); diff --git a/kmod/src/super.c b/kmod/src/super.c index bcbf9ebd..434aace6 100644 --- a/kmod/src/super.c +++ b/kmod/src/super.c @@ -179,7 +179,7 @@ static void scoutfs_put_super(struct super_block *sb) /* * Wait for invalidation and iput to finish with any lingering * inode references that escaped the evict_inodes in - * generic_shutdown_super. MS_ACTIVE is clear so final iput + * generic_shutdown_super. SB_ACTIVE is clear so final iput * will always evict. */ scoutfs_lock_flush_invalidate(sb); @@ -486,7 +486,7 @@ static int scoutfs_fill_super(struct super_block *sb, void *data, int silent) sb->s_d_op = &scoutfs_dentry_ops; sb->s_export_op = &scoutfs_export_ops; sb->s_xattr = scoutfs_xattr_handlers; - sb->s_flags |= MS_I_VERSION | MS_POSIXACL; + sb->s_flags |= SB_I_VERSION | SB_POSIXACL; sb->s_time_gran = 1; /* btree blocks use long lived bh->b_data refs */