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:
parent
768b1565d9
commit
36a304de26
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue