mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
0f166bf1d6
commit
729d015ab2
|
|
@ -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 @@ static bool try_to_unlazy(struct nameidata *nd)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user