Skip to content

Commit 729d015

Browse files
mjguzikbrauner
authored andcommitted
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>
1 parent 0f166bf commit 729d015

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

fs/namei.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ static bool try_to_unlazy(struct nameidata *nd)
881881
{
882882
struct dentry *parent = nd->path.dentry;
883883

884-
BUG_ON(!(nd->flags & LOOKUP_RCU));
884+
VFS_BUG_ON(!(nd->flags & LOOKUP_RCU));
885885

886886
if (unlikely(nd->depth && !legitimize_links(nd)))
887887
goto out1;
@@ -916,7 +916,8 @@ static bool try_to_unlazy(struct nameidata *nd)
916916
static bool try_to_unlazy_next(struct nameidata *nd, struct dentry *dentry)
917917
{
918918
int res;
919-
BUG_ON(!(nd->flags & LOOKUP_RCU));
919+
920+
VFS_BUG_ON(!(nd->flags & LOOKUP_RCU));
920921

921922
if (unlikely(nd->depth && !legitimize_links(nd)))
922923
goto out2;

0 commit comments

Comments
 (0)