[PATCH v4 07/72] nstree: simplify return

Christian Brauner posted 72 patches 3 months, 1 week ago
[PATCH v4 07/72] nstree: simplify return
Posted by Christian Brauner 3 months, 1 week ago
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