[PATCH RFC 12/41] rust_binderfs: use fc_init_pseudo()

From: Christian Brauner

Date: Tue Nov 10 2026 - 04:26:20 EST


Initialize binderfs as a pseudo filesystem instead of raising SB_I_NOEXEC
by hand. This adds SB_I_PSEUDO. binderfs_fill_super() keeps clearing
SB_I_NODEV for the binder device nodes.

Signed-off-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>
---
drivers/android/binder/rust_binderfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/android/binder/rust_binderfs.c b/drivers/android/binder/rust_binderfs.c
index 5f020226720d..04468c5b5c11 100644
--- a/drivers/android/binder/rust_binderfs.c
+++ b/drivers/android/binder/rust_binderfs.c
@@ -3,6 +3,7 @@
#include <linux/compiler_types.h>
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/pseudo_fs.h>
#include <linux/fsnotify.h>
#include <linux/gfp.h>
#include <linux/idr.h>
@@ -667,7 +668,6 @@ static int binderfs_fill_super(struct super_block *sb, struct fs_context *fc)
* necessary and safe.
*/
sb->s_iflags &= ~SB_I_NODEV;
- sb->s_iflags |= SB_I_NOEXEC;
sb->s_magic = RUST_BINDERFS_SUPER_MAGIC;
sb->s_op = &binderfs_super_ops;
sb->s_time_gran = 1;
@@ -759,6 +759,7 @@ static int binderfs_init_fs_context(struct fs_context *fc)
ctx->stats_mode = binderfs_stats_mode_unset;

fc->fs_private = ctx;
+ fc_init_pseudo(fc);
fc->ops = &binderfs_fs_context_ops;

return 0;

--
2.53.0