aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-11-01 00:37:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-12-04 14:34:17 -0500
commit64964528b24ea390824f0e5ce9d34b8d39b28cde (patch)
tree2de66d75468ad4ddecc7e175f86f1dbaae47ea9a /fs/namespace.c
parent3c0411846118a578de3a979faf2da3ab5fb81179 (diff)
make proc_ns_operations work with struct ns_common * instead of void *
We can do that now. And kill ->inum(), while we are at it - all instances are identical. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 5c21fdadabe4..b9c16c3f63f5 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -3149,7 +3149,7 @@ found:
3149 return visible; 3149 return visible;
3150} 3150}
3151 3151
3152static void *mntns_get(struct task_struct *task) 3152static struct ns_common *mntns_get(struct task_struct *task)
3153{ 3153{
3154 struct ns_common *ns = NULL; 3154 struct ns_common *ns = NULL;
3155 struct nsproxy *nsproxy; 3155 struct nsproxy *nsproxy;
@@ -3165,12 +3165,12 @@ static void *mntns_get(struct task_struct *task)
3165 return ns; 3165 return ns;
3166} 3166}
3167 3167
3168static void mntns_put(void *ns) 3168static void mntns_put(struct ns_common *ns)
3169{ 3169{
3170 put_mnt_ns(to_mnt_ns(ns)); 3170 put_mnt_ns(to_mnt_ns(ns));
3171} 3171}
3172 3172
3173static int mntns_install(struct nsproxy *nsproxy, void *ns) 3173static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
3174{ 3174{
3175 struct fs_struct *fs = current->fs; 3175 struct fs_struct *fs = current->fs;
3176 struct mnt_namespace *mnt_ns = to_mnt_ns(ns); 3176 struct mnt_namespace *mnt_ns = to_mnt_ns(ns);
@@ -3203,17 +3203,10 @@ static int mntns_install(struct nsproxy *nsproxy, void *ns)
3203 return 0; 3203 return 0;
3204} 3204}
3205 3205
3206static unsigned int mntns_inum(void *ns)
3207{
3208 struct ns_common *p = ns;
3209 return p->inum;
3210}
3211
3212const struct proc_ns_operations mntns_operations = { 3206const struct proc_ns_operations mntns_operations = {
3213 .name = "mnt", 3207 .name = "mnt",
3214 .type = CLONE_NEWNS, 3208 .type = CLONE_NEWNS,
3215 .get = mntns_get, 3209 .get = mntns_get,
3216 .put = mntns_put, 3210 .put = mntns_put,
3217 .install = mntns_install, 3211 .install = mntns_install,
3218 .inum = mntns_inum,
3219}; 3212};