namespacefs: Add methods to create/remove PID namespace directories

Each existing namespace on the system will be represented by a
corresponding directory in namespacesfs. When a namespace is created
a new directory will be added. When a namespace is destroyed, its
corresponding directory will be removed. The hierarchy of the
directories will follow the hierarchy of the namespaces. As a first
step towards this, here we add methods for creating/removing PID
namespace directories. For the moment the PID namespace directory
contains only one file called 'tasks'. This is a read only pseudo
file that provides the list of PIDs of all tasks enclosed into the

Signed-off-by: Yordan Karadzhov (VMware) <>
3 files changed