aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-24 17:08:36 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:23:35 +0200
commit7aed53d1dfd14d468e065212ce45068e2b50c1fa (patch)
tree4fc1d297c3c308d37222e350f0a54f7bb100045e /fs/proc/internal.h
parentproc: simplify proc_register calling conventions (diff)
downloadlinux-dev-7aed53d1dfd14d468e065212ce45068e2b50c1fa.tar.xz
linux-dev-7aed53d1dfd14d468e065212ce45068e2b50c1fa.zip
proc: add a proc_create_reg helper
Common code for creating a regular file. Factor out of proc_create_data, to be reused by other functions soon. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r--fs/proc/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 488e67490312..dd1e11400b97 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -162,6 +162,8 @@ extern bool proc_fill_cache(struct file *, struct dir_context *, const char *, i
/*
* generic.c
*/
+struct proc_dir_entry *proc_create_reg(const char *name, umode_t mode,
+ struct proc_dir_entry **parent, void *data);
struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
struct proc_dir_entry *dp);
extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);