[PATCH] debugfs: Fix default access mode config check

From: Aaron Thompson
Date: Tue Dec 02 2025 - 02:19:13 EST


This typo caused debugfs to always behave as if
CONFIG_DEBUG_FS_ALLOW_NONE was selected.

Fixes: f278809475f6 ("debugfs: Remove broken no-mount mode")
Reported-by: Mark Brown <broonie@xxxxxxxxxx>
Tested-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
Signed-off-by: Aaron Thompson <dev@xxxxxxxxxx>
---
fs/debugfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 0284b0256195..3b3713fcbbcb 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -35,7 +35,7 @@
static struct vfsmount *debugfs_mount;
static int debugfs_mount_count;
static bool debugfs_registered;
-static bool debugfs_enabled __ro_after_init = IS_ENABLED(DEBUG_FS_ALLOW_ALL);
+static bool debugfs_enabled __ro_after_init = IS_ENABLED(CONFIG_DEBUG_FS_ALLOW_ALL);

/*
* Don't allow access attributes to be changed whilst the kernel is locked down

base-commit: f278809475f6835b56de78b28dc2cc0c7e2c20a4
--
2.47.3