aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kernfs.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index fad8b986800f..75fcbe5c9d65 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -18,6 +18,8 @@ struct file;
18struct iattr; 18struct iattr;
19struct seq_file; 19struct seq_file;
20struct vm_area_struct; 20struct vm_area_struct;
21struct super_block;
22struct file_system_type;
21 23
22struct sysfs_dirent; 24struct sysfs_dirent;
23 25
@@ -109,6 +111,13 @@ void kernfs_enable_ns(struct sysfs_dirent *sd);
109int kernfs_setattr(struct sysfs_dirent *sd, const struct iattr *iattr); 111int kernfs_setattr(struct sysfs_dirent *sd, const struct iattr *iattr);
110void kernfs_notify(struct sysfs_dirent *sd); 112void kernfs_notify(struct sysfs_dirent *sd);
111 113
114const void *kernfs_super_ns(struct super_block *sb);
115struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags,
116 struct kernfs_root *root, const void *ns);
117void kernfs_kill_sb(struct super_block *sb);
118
119void kernfs_init(void);
120
112#else /* CONFIG_SYSFS */ 121#else /* CONFIG_SYSFS */
113 122
114static inline struct sysfs_dirent * 123static inline struct sysfs_dirent *
@@ -160,6 +169,18 @@ static inline int kernfs_setattr(struct sysfs_dirent *sd,
160 169
161static inline void kernfs_notify(struct sysfs_dirent *sd) { } 170static inline void kernfs_notify(struct sysfs_dirent *sd) { }
162 171
172static inline const void *kernfs_super_ns(struct super_block *sb)
173{ return NULL; }
174
175static inline struct dentry *
176kernfs_mount_ns(struct file_system_type *fs_type, int flags,
177 struct kernfs_root *root, const void *ns)
178{ return ERR_PTR(-ENOSYS); }
179
180static inline void kernfs_kill_sb(struct super_block *sb) { }
181
182static inline void kernfs_init(void) { }
183
163#endif /* CONFIG_SYSFS */ 184#endif /* CONFIG_SYSFS */
164 185
165static inline struct sysfs_dirent * 186static inline struct sysfs_dirent *
@@ -201,4 +222,11 @@ static inline int kernfs_remove_by_name(struct sysfs_dirent *parent,
201 return kernfs_remove_by_name_ns(parent, name, NULL); 222 return kernfs_remove_by_name_ns(parent, name, NULL);
202} 223}
203 224
225static inline struct dentry *
226kernfs_mount(struct file_system_type *fs_type, int flags,
227 struct kernfs_root *root)
228{
229 return kernfs_mount_ns(fs_type, flags, root, NULL);
230}
231
204#endif /* __LINUX_KERNFS_H */ 232#endif /* __LINUX_KERNFS_H */