aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-09-17 15:58:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-09-17 15:58:06 -0400
commit1b966c4471e6c3862a14f80aeb316ef636d40f84 (patch)
treee9b08be9e41d724caf5d28718c2156cfa34b45be /fs/namespace.c
parentopen_detached_copy(): separate creation of namespace into helper (diff)
parentmnt_ns_tree_remove(): DTRT if mnt_ns had never been added to mnt_ns_list (diff)
downloadwireguard-linux-1b966c4471e6c3862a14f80aeb316ef636d40f84.tar.xz
wireguard-linux-1b966c4471e6c3862a14f80aeb316ef636d40f84.zip
Merge branch 'no-rebase-mnt_ns_tree_remove' into work.mount
Diffstat (limited to '')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 4ebd9cc6f6c6..5968c44cc38a 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -195,7 +195,7 @@ static void mnt_ns_release_rcu(struct rcu_head *rcu)
static void mnt_ns_tree_remove(struct mnt_namespace *ns)
{
/* remove from global mount namespace list */
- if (!is_anon_ns(ns)) {
+ if (!RB_EMPTY_NODE(&ns->mnt_ns_tree_node)) {
mnt_ns_tree_write_lock();
rb_erase(&ns->mnt_ns_tree_node, &mnt_ns_tree);
list_bidir_del_rcu(&ns->mnt_ns_list);