diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-01 15:57:28 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-11 03:30:20 +0100 |
commit | e149ed2b805fefdccf7ccdfc19eca22fdd4514ac (patch) | |
tree | 8c9cd88deff8c7309ca2acb8d4cb475aaca47b14 /include/uapi | |
parent | bury struct proc_ns in fs/proc (diff) | |
download | linux-e149ed2b805fefdccf7ccdfc19eca22fdd4514ac.tar.xz linux-e149ed2b805fefdccf7ccdfc19eca22fdd4514ac.zip |
take the targets of /proc/*/ns/* symlinks to separate fs
New pseudo-filesystem: nsfs. Targets of /proc/*/ns/* live there now.
It's not mountable (not even registered, so it's not in /proc/filesystems,
etc.). Files on it *are* bindable - we explicitly permit that in do_loopback().
This stuff lives in fs/nsfs.c now; proc_ns_fget() moved there as well.
get_proc_ns() is a macro now (it's simply returning ->i_private; would
have been an inline, if not for header ordering headache).
proc_ns_inode() is an ex-parrot. The interface used in procfs is
ns_get_path(path, task, ops) and ns_get_name(buf, size, task, ops).
Dentries and inodes are never hashed; a non-counting reference to dentry
is stashed in ns_common (removed by ->d_prune()) and reused by ns_get_path()
if present. See ns_get_path()/ns_prune_dentry/nsfs_evict() for details
of that mechanism.
As the result, proc_ns_follow_link() has stopped poking in nd->path.mnt;
it does nd_jump_link() on a consistent <vfsmount,dentry> pair it gets
from ns_get_path().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/magic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 77c60311a6c6..7d664ea85ebd 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h @@ -72,5 +72,6 @@ #define MTD_INODE_FS_MAGIC 0x11307854 #define ANON_INODE_FS_MAGIC 0x09041934 #define BTRFS_TEST_MAGIC 0x73727279 +#define NSFS_MAGIC 0x6e736673 #endif /* __LINUX_MAGIC_H__ */ |