aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/debugfs.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-02-02 11:47:31 -0500
committerSteven Rostedt <rostedt@goodmis.org>2015-02-02 11:47:31 -0500
commitdfbc1534eac550b37df592a8a0b550cd47539d0b (patch)
treeec2f50ac271be0bad556e5e22a204bddc1f63a9a /include/linux/debugfs.h
parent7eeafbcab47fe9860e5106286db83d60e3f35644 (diff)
parent163f9eb95a10371ead59b62087e0d4e7ce53112e (diff)
Merge branch 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs into trace/ftrace/tracefs
Pull in Al Viro's changes to debugfs that implement the new primitive: debugfs_create_automount(), that creates a directory in debugfs that will safely mount another file system automatically when debugfs is mounted. This will let tracefs automount itself on top of debugfs/tracing directory.
Diffstat (limited to 'include/linux/debugfs.h')
-rw-r--r--include/linux/debugfs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index da4c4983adbe..cb25af461054 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -51,11 +51,21 @@ struct dentry *debugfs_create_file(const char *name, umode_t mode,
51 struct dentry *parent, void *data, 51 struct dentry *parent, void *data,
52 const struct file_operations *fops); 52 const struct file_operations *fops);
53 53
54struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
55 struct dentry *parent, void *data,
56 const struct file_operations *fops,
57 loff_t file_size);
58
54struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); 59struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
55 60
56struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, 61struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
57 const char *dest); 62 const char *dest);
58 63
64struct dentry *debugfs_create_automount(const char *name,
65 struct dentry *parent,
66 struct vfsmount *(*f)(void *),
67 void *data);
68
59void debugfs_remove(struct dentry *dentry); 69void debugfs_remove(struct dentry *dentry);
60void debugfs_remove_recursive(struct dentry *dentry); 70void debugfs_remove_recursive(struct dentry *dentry);
61 71
@@ -124,6 +134,14 @@ static inline struct dentry *debugfs_create_file(const char *name, umode_t mode,
124 return ERR_PTR(-ENODEV); 134 return ERR_PTR(-ENODEV);
125} 135}
126 136
137static inline struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
138 struct dentry *parent, void *data,
139 const struct file_operations *fops,
140 loff_t file_size)
141{
142 return ERR_PTR(-ENODEV);
143}
144
127static inline struct dentry *debugfs_create_dir(const char *name, 145static inline struct dentry *debugfs_create_dir(const char *name,
128 struct dentry *parent) 146 struct dentry *parent)
129{ 147{