On Thu, Jan 16, 2025 at 12:49:32PM -0600, Eric Sandeen wrote: > + switch (opt) { > + case Opt_type: > + if (reconfigure && > + (ctx->mount_options & UFS_MOUNT_UFSTYPE) != result.uint_32) { > + pr_err("ufstype can't be changed during remount\n"); > + return -EINVAL; > } > + ufs_clear_opt(ctx->mount_options, UFS_MOUNT_UFSTYPE); > + ufs_set_opt(ctx->mount_options, result.uint_32); > + break; Do we really want to support ufstype=foo,ufstype=bar? > +static void ufs_free_fc(struct fs_context *fc) > +{ > + kfree(fc->fs_private); > +} Grr... That's getting really annoying - we have way too many instances doing exactly that. Helper, perhaps? > -#define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt > -#define ufs_test_opt(o,opt) ((o) & UFS_MOUNT_##opt) > +#define ufs_clear_opt(o, opt) (o &= ~(opt)) > +#define ufs_set_opt(o, opt) (o |= (opt)) > +#define ufs_test_opt(o, opt) ((o) & opt) I wonder if we would be better off without those macros (note, BTW, that ufs_test_opt() is not used at all)...