Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Mateusz Guzik and committed by
Christian Brauner
729d015a 0f166bf1

+3 -2
+3 -2
fs/namei.c
··· 881 881 { 882 882 struct dentry *parent = nd->path.dentry; 883 883 884 - BUG_ON(!(nd->flags & LOOKUP_RCU)); 884 + VFS_BUG_ON(!(nd->flags & LOOKUP_RCU)); 885 885 886 886 if (unlikely(nd->depth && !legitimize_links(nd))) 887 887 goto out1; ··· 916 916 static bool try_to_unlazy_next(struct nameidata *nd, struct dentry *dentry) 917 917 { 918 918 int res; 919 - BUG_ON(!(nd->flags & LOOKUP_RCU)); 919 + 920 + VFS_BUG_ON(!(nd->flags & LOOKUP_RCU)); 920 921 921 922 if (unlikely(nd->depth && !legitimize_links(nd))) 922 923 goto out2;