diff options
| author | Jianyu Zhan <nasa4836@gmail.com> | 2014-04-26 03:40:28 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-27 17:33:17 -0400 |
| commit | 26fc9cd200ec839e0b3095e05ae018f27314e7aa (patch) | |
| tree | 26929ec0f651c6ddaac58cd8061f4a9644440a86 /include/linux | |
| parent | 9f70a40128a4ddceffb6d21dd490f6ab4bc34c97 (diff) | |
kernfs: move the last knowledge of sysfs out from kernfs
There is still one residue of sysfs remaining: the sb_magic
SYSFS_MAGIC. However this should be kernfs user specific,
so this patch moves it out. Kerrnfs user should specify their
magic number while mouting.
Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kernfs.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index c841688a78a3..17aa1cce6f8e 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
| @@ -301,8 +301,8 @@ void kernfs_notify(struct kernfs_node *kn); | |||
| 301 | 301 | ||
| 302 | const void *kernfs_super_ns(struct super_block *sb); | 302 | const void *kernfs_super_ns(struct super_block *sb); |
| 303 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 303 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
| 304 | struct kernfs_root *root, bool *new_sb_created, | 304 | struct kernfs_root *root, unsigned long magic, |
| 305 | const void *ns); | 305 | bool *new_sb_created, const void *ns); |
| 306 | void kernfs_kill_sb(struct super_block *sb); | 306 | void kernfs_kill_sb(struct super_block *sb); |
| 307 | 307 | ||
| 308 | void kernfs_init(void); | 308 | void kernfs_init(void); |
| @@ -395,7 +395,8 @@ static inline const void *kernfs_super_ns(struct super_block *sb) | |||
| 395 | 395 | ||
| 396 | static inline struct dentry * | 396 | static inline struct dentry * |
| 397 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 397 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
| 398 | struct kernfs_root *root, bool *new_sb_created, const void *ns) | 398 | struct kernfs_root *root, unsigned long magic, |
| 399 | bool *new_sb_created, const void *ns) | ||
| 399 | { return ERR_PTR(-ENOSYS); } | 400 | { return ERR_PTR(-ENOSYS); } |
| 400 | 401 | ||
| 401 | static inline void kernfs_kill_sb(struct super_block *sb) { } | 402 | static inline void kernfs_kill_sb(struct super_block *sb) { } |
| @@ -453,9 +454,11 @@ static inline int kernfs_rename(struct kernfs_node *kn, | |||
| 453 | 454 | ||
| 454 | static inline struct dentry * | 455 | static inline struct dentry * |
| 455 | kernfs_mount(struct file_system_type *fs_type, int flags, | 456 | kernfs_mount(struct file_system_type *fs_type, int flags, |
| 456 | struct kernfs_root *root, bool *new_sb_created) | 457 | struct kernfs_root *root, unsigned long magic, |
| 458 | bool *new_sb_created) | ||
| 457 | { | 459 | { |
| 458 | return kernfs_mount_ns(fs_type, flags, root, new_sb_created, NULL); | 460 | return kernfs_mount_ns(fs_type, flags, root, |
| 461 | magic, new_sb_created, NULL); | ||
| 459 | } | 462 | } |
| 460 | 463 | ||
| 461 | #endif /* __LINUX_KERNFS_H */ | 464 | #endif /* __LINUX_KERNFS_H */ |
