Thread (59 messages) 59 messages, 5 authors, 2025-10-27
STALE240d

[PATCH RFC DRAFT 06/50] nstree: simplify return

From: Christian Brauner <brauner@kernel.org>
Date: 2025-10-21 11:44:19
Also in: bpf, cgroups, linux-fsdevel, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

node_to_ns() checks for NULL and the assert isn't really helpful and
will have to be dropped later anyway.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 kernel/nstree.c | 5 -----
 1 file changed, 5 deletions(-)
diff --git a/kernel/nstree.c b/kernel/nstree.c
index b24a320a11a6..369fd1675c6a 100644
--- a/kernel/nstree.c
+++ b/kernel/nstree.c
@@ -194,11 +194,6 @@ struct ns_common *ns_tree_lookup_rcu(u64 ns_id, int ns_type)
 			break;
 	} while (read_seqretry(&ns_tree->ns_tree_lock, seq));
 
-	if (!node)
-		return NULL;
-
-	VFS_WARN_ON_ONCE(node_to_ns(node)->ns_type != ns_type);
-
 	return node_to_ns(node);
 }
 
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help