This is what
[PATCH 1/4] procfs: proc_get_sb: consolidate/cleanup root_inode->pid logic
[PATCH 2/4] procfs: kill the global proc_mnt variable
do. But,
Afaics, this is wrong.
If pid_ns_prepare_proc() fails we shouldn't blindly return ENOMEM
and, more importantly, we need put_pid_ns(parent_ns).
Oleg.
--