summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2025-12-29 13:57:51 +0100
committerChristian Brauner <brauner@kernel.org>2026-01-06 22:47:07 +0100
commit729d015ab230d1d6debd69744c6e0fb70c16a779 (patch)
treec4783916c1b3be3fa934c571a581e7aa4360fb7c
parent0f166bf1d6d82701cc1d94445cc2a9107d1790df (diff)
fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS
Calls to the 2 modified routines are explicitly gated with checks for the flag, so there is no use for this in production kernels. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://patch.msgid.link/20251229125751.826050-1-mjguzik@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--fs/namei.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index bf0f66f0e9b9..280c69e8fb99 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -881,7 +881,7 @@ static bool try_to_unlazy(struct nameidata *nd)
{
struct dentry *parent = nd->path.dentry;
- BUG_ON(!(nd->flags & LOOKUP_RCU));
+ VFS_BUG_ON(!(nd->flags & LOOKUP_RCU));
if (unlikely(nd->depth && !legitimize_links(nd)))
goto out1;
@@ -916,7 +916,8 @@ out:
static bool try_to_unlazy_next(struct nameidata *nd, struct dentry *dentry)
{
int res;
- BUG_ON(!(nd->flags & LOOKUP_RCU));
+
+ VFS_BUG_ON(!(nd->flags & LOOKUP_RCU));
if (unlikely(nd->depth && !legitimize_links(nd)))
goto out2;