nstree: simplify return

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

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-7-2e6f823ebdc0@kernel.org
Tested-by: syzbot@syzkaller.appspotmail.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner 2025-10-29 13:20:20 +01:00
parent 768b1565d9
commit 36a304de26
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
1 changed files with 0 additions and 5 deletions

View File

@ -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);
}