xref: /openbmc/linux/fs/tracefs/internal.h (revision 046b212a)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _TRACEFS_INTERNAL_H
3 #define _TRACEFS_INTERNAL_H
4 
5 enum {
6 	TRACEFS_EVENT_INODE     = BIT(1),
7 };
8 
9 struct tracefs_inode {
10 	unsigned long           flags;
11 	void                    *private;
12 	struct inode            vfs_inode;
13 };
14 
15 static inline struct tracefs_inode *get_tracefs(const struct inode *inode)
16 {
17 	return container_of(inode, struct tracefs_inode, vfs_inode);
18 }
19 
20 struct dentry *tracefs_start_creating(const char *name, struct dentry *parent);
21 struct dentry *tracefs_end_creating(struct dentry *dentry);
22 struct dentry *tracefs_failed_creating(struct dentry *dentry);
23 struct inode *tracefs_get_inode(struct super_block *sb);
24 struct dentry *eventfs_start_creating(const char *name, struct dentry *parent);
25 struct dentry *eventfs_failed_creating(struct dentry *dentry);
26 struct dentry *eventfs_end_creating(struct dentry *dentry);
27 void eventfs_set_ef_status_free(struct dentry *dentry);
28 
29 #endif /* _TRACEFS_INTERNAL_H */
30