mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS
@ 2025-12-29 12:57 Mateusz Guzik
  2026-01-05 17:18 ` Jan Kara
  2026-01-06 22:51 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Mateusz Guzik @ 2025-12-29 12:57 UTC (permalink / raw)
  To: brauner, viro; +Cc: jack, linux-kernel, linux-fsdevel, Mateusz Guzik

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>
---
 fs/namei.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index f7a8b5b000c2..9c5a372a86f6 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -879,7 +879,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->flags & LOOKUP_CACHED)) {
 		drop_links(nd);
@@ -919,7 +919,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->flags & LOOKUP_CACHED)) {
 		drop_links(nd);
-- 
2.48.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS
  2025-12-29 12:57 [PATCH] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS Mateusz Guzik
@ 2026-01-05 17:18 ` Jan Kara
  2026-01-06 22:51 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2026-01-05 17:18 UTC (permalink / raw)
  To: Mateusz Guzik; +Cc: brauner, viro, jack, linux-kernel, linux-fsdevel

On Mon 29-12-25 13:57:51, Mateusz Guzik wrote:
> 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>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/namei.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index f7a8b5b000c2..9c5a372a86f6 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -879,7 +879,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->flags & LOOKUP_CACHED)) {
>  		drop_links(nd);
> @@ -919,7 +919,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->flags & LOOKUP_CACHED)) {
>  		drop_links(nd);
> -- 
> 2.48.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS
  2025-12-29 12:57 [PATCH] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS Mateusz Guzik
  2026-01-05 17:18 ` Jan Kara
@ 2026-01-06 22:51 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2026-01-06 22:51 UTC (permalink / raw)
  To: Mateusz Guzik; +Cc: Christian Brauner, jack, linux-kernel, linux-fsdevel, viro

On Mon, 29 Dec 2025 13:57:51 +0100, Mateusz Guzik wrote:
> Calls to the 2 modified routines are explicitly gated with checks for
> the flag, so there is no use for this in production kernels.
> 
> 

Applied to the vfs-7.0.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.0.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.0.misc

[1/1] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS
      https://git.kernel.org/vfs/vfs/c/729d015ab230

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-06 22:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-29 12:57 [PATCH] fs: only assert on LOOKUP_RCU when built with CONFIG_DEBUG_VFS Mateusz Guzik
2026-01-05 17:18 ` Jan Kara
2026-01-06 22:51 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®