Initialize functionfs as a pseudo filesystem. This raises SB_I_PSEUDO and also SB_I_NOEXEC and SB_I_NODEV. functionfs never holds executables or device nodes.
Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- drivers/usb/gadget/function/f_fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index c64a268e98a4..a6b3788399a5 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -15,6 +15,7 @@ /* #define VERBOSE_DEBUG */ #include <linux/blkdev.h> +#include <linux/pseudo_fs.h> #include <linux/dma-buf.h> #include <linux/dma-fence.h> #include <linux/dma-resv.h> @@ -2166,6 +2167,7 @@ static int ffs_fs_init_fs_context(struct fs_context *fc) ctx->no_disconnect = false; fc->fs_private = ctx; + fc_init_pseudo(fc); fc->ops = &ffs_fs_context_ops; return 0; } -- 2.53.0
