[PATCH RFC 19/41] smack: use fc_init_pseudo() for smackfs

Alexander Mikhalitsyn alex at amutable.com
Fri Nov 13 02:12:03 PST 2026


On Tue, 2026-11-10 at 10:14 +0100, Christian Brauner wrote:
> Initialize smackfs as a pseudo filesystem. This raises SB_I_PSEUDO
> and
> also SB_I_NOEXEC and SB_I_NODEV. smackfs never holds executables or
> device nodes.
> 
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Reviewed-by: Alexander Mikhalitsyn <alex at amutable.com>

> ---
>  security/smack/smackfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
> index a72bc7fabea9..4a56bbeaeca3 100644
> --- a/security/smack/smackfs.c
> +++ b/security/smack/smackfs.c
> @@ -25,6 +25,7 @@
>  #include <linux/magic.h>
>  #include <linux/mount.h>
>  #include <linux/fs_context.h>
> +#include <linux/pseudo_fs.h>
>  #include "smack.h"
>  
>  #define BEBITS	(sizeof(__be32) * 8)
> @@ -2880,6 +2881,7 @@ static const struct fs_context_operations
> smk_context_ops = {
>   */
>  static int smk_init_fs_context(struct fs_context *fc)
>  {
> +	fc_init_pseudo(fc);
>  	fc->ops = &smk_context_ops;
>  	return 0;
>  }



More information about the Linux-nvme mailing list