summaryrefslogtreecommitdiffstats
path: root/fs/proc/generic.c
diff options
context:
space:
mode:
authorDavid Howells2013-04-12 19:03:36 +0200
committerAl Viro2013-05-01 23:29:47 +0200
commitc30480b92cf497aa3b463367a82f1c2fdc5c46e9 (patch)
treebe6dea0c5a45bd60a03ae99efdda0eb365db884a /fs/proc/generic.c
parentproc: Supply a function to remove a proc entry by PDE (diff)
downloadkernel-qcow2-linux-c30480b92cf497aa3b463367a82f1c2fdc5c46e9.tar.gz
kernel-qcow2-linux-c30480b92cf497aa3b463367a82f1c2fdc5c46e9.tar.xz
kernel-qcow2-linux-c30480b92cf497aa3b463367a82f1c2fdc5c46e9.zip
proc: Make the PROC_I() and PDE() macros internal to procfs
Make the PROC_I() and PDE() macros internal to procfs. This means making PDE_DATA() out of line. This could be made more optimal by storing PDE()->data into inode->i_private. Also provide a __PDE_DATA() that is inline and internal to procfs. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r--fs/proc/generic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index d9631d9b7aff..a2596afffae6 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -165,7 +165,7 @@ void proc_free_inum(unsigned int inum)
static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
{
- nd_set_link(nd, PDE_DATA(dentry->d_inode));
+ nd_set_link(nd, __PDE_DATA(dentry->d_inode));
return NULL;
}
@@ -631,3 +631,9 @@ void proc_remove(struct proc_dir_entry *de)
remove_proc_subtree(de->name, de->parent);
}
EXPORT_SYMBOL(proc_remove);
+
+void *PDE_DATA(const struct inode *inode)
+{
+ return __PDE_DATA(inode);
+}
+EXPORT_SYMBOL(PDE_DATA);