diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-01 00:37:32 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-04 14:34:17 -0500 |
commit | 64964528b24ea390824f0e5ce9d34b8d39b28cde (patch) | |
tree | 2de66d75468ad4ddecc7e175f86f1dbaae47ea9a /fs/proc/namespaces.c | |
parent | 3c0411846118a578de3a979faf2da3ab5fb81179 (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/namespaces.c')
-rw-r--r-- | fs/proc/namespaces.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index 89026095f2b..995e8e98237 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, struct inode *inode; struct proc_inode *ei; struct qstr qname = { .name = "", }; - void *ns; + struct ns_common *ns; ns = ns_ops->get(task); if (!ns) @@ -76,7 +76,7 @@ static struct dentry *proc_ns_get_dentry(struct super_block *sb, return ERR_PTR(-ENOMEM); } - inode = iget_locked(sb, ns_ops->inum(ns)); + inode = iget_locked(sb, ns->inum); if (!inode) { dput(dentry); ns_ops->put(ns); @@ -144,7 +144,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl struct proc_inode *ei = PROC_I(inode); const struct proc_ns_operations *ns_ops = ei->ns.ns_ops; struct task_struct *task; - void *ns; + struct ns_common *ns; char name[50]; int res = -EACCES; @@ -160,7 +160,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl if (!ns) goto out_put_task; - snprintf(name, sizeof(name), "%s:[%u]", ns_ops->name, ns_ops->inum(ns)); + snprintf(name, sizeof(name), "%s:[%u]", ns_ops->name, ns->inum); res = readlink_copy(buffer, buflen, name); ns_ops->put(ns); out_put_task: |