Initialize mqueue as a pseudo filesystem instead of raising SB_I_NOEXEC and SB_I_NODEV by hand. This adds SB_I_PSEUDO.
Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- ipc/mqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 322c3dd98c44..8bbe32d0881f 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -18,6 +18,7 @@ #include <linux/file.h> #include <linux/mount.h> #include <linux/fs_context.h> +#include <linux/pseudo_fs.h> #include <linux/namei.h> #include <linux/sysctl.h> #include <linux/poll.h> @@ -405,7 +406,6 @@ static int mqueue_fill_super(struct super_block *sb, struct fs_context *fc) struct inode *inode; struct ipc_namespace *ns = sb->s_fs_info; - sb->s_iflags |= SB_I_NOEXEC | SB_I_NODEV; sb->s_blocksize = PAGE_SIZE; sb->s_blocksize_bits = PAGE_SHIFT; sb->s_magic = MQUEUE_MAGIC; @@ -457,6 +457,7 @@ static int mqueue_init_fs_context(struct fs_context *fc) put_user_ns(fc->user_ns); fc->user_ns = get_user_ns(ctx->ipc_ns->user_ns); fc->fs_private = ctx; + fc_init_pseudo(fc); fc->ops = &mqueue_fs_context_ops; return 0; } -- 2.53.0
