mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 04:14:49 +08:00
put_mnt_ns(): use drop_collected_mounts()
... rather than open-coding it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
84eb3532b5
commit
7b00ed6fe6
@ -2802,11 +2802,7 @@ void put_mnt_ns(struct mnt_namespace *ns)
|
||||
{
|
||||
if (!atomic_dec_and_test(&ns->count))
|
||||
return;
|
||||
namespace_lock();
|
||||
br_write_lock(&vfsmount_lock);
|
||||
umount_tree(ns->root, 0);
|
||||
br_write_unlock(&vfsmount_lock);
|
||||
namespace_unlock();
|
||||
drop_collected_mounts(&ns->root->mnt);
|
||||
free_mnt_ns(ns);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user