mirror of
https://github.com/torvalds/linux.git
synced 2026-10-24 16:55:02 +02:00
fs: namespace: drop BUG_ON() in copy_mnt_ns()
The sole caller, create_new_namespaces(), always passes a valid mount namespace pointer from the task's nsproxy. The other copy_*_ns() helpers, e.g. copy_time_ns() and copy_pid_ns(), don't perform such a check either. Drop the BUG_ON() for consistency with them. Signed-off-by: Shaojie Sun <sunshaojie@kylinos.cn> Link: https://patch.msgid.link/20260903064828.126643-4-sunshaojie@kylinos.cn Reviewed-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
d54cc3a527
commit
4141e148e6
|
|
@ -4247,8 +4247,6 @@ struct mnt_namespace *copy_mnt_ns(u64 flags, struct mnt_namespace *ns,
|
|||
struct mount *new;
|
||||
int copy_flags;
|
||||
|
||||
BUG_ON(!ns);
|
||||
|
||||
if (likely(!(flags & CLONE_NEWNS))) {
|
||||
get_mnt_ns(ns);
|
||||
return ns;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user