aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
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/proc
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/proc')
-rw-r--r--fs/proc/inode.c2
-rw-r--r--fs/proc/namespaces.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 333080d7a671..43b703c6cd3b 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -33,7 +33,7 @@ static void proc_evict_inode(struct inode *inode)
33 struct proc_dir_entry *de; 33 struct proc_dir_entry *de;
34 struct ctl_table_header *head; 34 struct ctl_table_header *head;
35 const struct proc_ns_operations *ns_ops; 35 const struct proc_ns_operations *ns_ops;
36 void *ns; 36 struct ns_common *ns;
37 37
38 truncate_inode_pages_final(&inode->i_data); 38 truncate_inode_pages_final(&inode->i_data);
39 clear_inode(inode); 39 clear_inode(inode);
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index 89026095f2b5..995e8e98237d 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -64,7 +64,7 @@ static struct dentry *proc_ns_get_dentry(struct super_block *sb,
64 struct inode *inode; 64 struct inode *inode;
65 struct proc_inode *ei; 65 struct proc_inode *ei;
66 struct qstr qname = { .name = "", }; 66 struct qstr qname = { .name = "", };
67 void *ns; 67 struct ns_common *ns;
68 68
69 ns = ns_ops->get(task); 69 ns = ns_ops->get(task);
70 if (!ns) 70 if (!ns)
@@ -76,7 +76,7 @@ static struct dentry *proc_ns_get_dentry(struct super_block *sb,
76 return ERR_PTR(-ENOMEM); 76 return ERR_PTR(-ENOMEM);
77 } 77 }
78 78
79 inode = iget_locked(sb, ns_ops->inum(ns)); 79 inode = iget_locked(sb, ns->inum);
80 if (!inode) { 80 if (!inode) {
81 dput(dentry); 81 dput(dentry);
82 ns_ops->put(ns); 82 ns_ops->put(ns);
@@ -144,7 +144,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl
144 struct proc_inode *ei = PROC_I(inode); 144 struct proc_inode *ei = PROC_I(inode);
145 const struct proc_ns_operations *ns_ops = ei->ns.ns_ops; 145 const struct proc_ns_operations *ns_ops = ei->ns.ns_ops;
146 struct task_struct *task; 146 struct task_struct *task;
147 void *ns; 147 struct ns_common *ns;
148 char name[50]; 148 char name[50];
149 int res = -EACCES; 149 int res = -EACCES;
150 150
@@ -160,7 +160,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl
160 if (!ns) 160 if (!ns)
161 goto out_put_task; 161 goto out_put_task;
162 162
163 snprintf(name, sizeof(name), "%s:[%u]", ns_ops->name, ns_ops->inum(ns)); 163 snprintf(name, sizeof(name), "%s:[%u]", ns_ops->name, ns->inum);
164 res = readlink_copy(buffer, buflen, name); 164 res = readlink_copy(buffer, buflen, name);
165 ns_ops->put(ns); 165 ns_ops->put(ns);
166out_put_task: 166out_put_task: