diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/kernfs.h | 3 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 3 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 15 |
4 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3f1a84635da8..8a81fcbb0074 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1917,6 +1917,7 @@ struct file_system_type { | |||
| 1917 | #define FS_HAS_SUBTYPE 4 | 1917 | #define FS_HAS_SUBTYPE 4 |
| 1918 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ | 1918 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ |
| 1919 | #define FS_USERNS_DEV_MOUNT 16 /* A userns mount does not imply MNT_NODEV */ | 1919 | #define FS_USERNS_DEV_MOUNT 16 /* A userns mount does not imply MNT_NODEV */ |
| 1920 | #define FS_USERNS_VISIBLE 32 /* FS must already be visible */ | ||
| 1920 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ | 1921 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ |
| 1921 | struct dentry *(*mount) (struct file_system_type *, int, | 1922 | struct dentry *(*mount) (struct file_system_type *, int, |
| 1922 | const char *, void *); | 1923 | const char *, void *); |
| @@ -2004,7 +2005,6 @@ extern int vfs_ustat(dev_t, struct kstatfs *); | |||
| 2004 | extern int freeze_super(struct super_block *super); | 2005 | extern int freeze_super(struct super_block *super); |
| 2005 | extern int thaw_super(struct super_block *super); | 2006 | extern int thaw_super(struct super_block *super); |
| 2006 | extern bool our_mnt(struct vfsmount *mnt); | 2007 | extern bool our_mnt(struct vfsmount *mnt); |
| 2007 | extern bool fs_fully_visible(struct file_system_type *); | ||
| 2008 | 2008 | ||
| 2009 | extern int current_umask(void); | 2009 | extern int current_umask(void); |
| 2010 | 2010 | ||
| @@ -2816,6 +2816,8 @@ extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned in | |||
| 2816 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 2816 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
| 2817 | extern const struct file_operations simple_dir_operations; | 2817 | extern const struct file_operations simple_dir_operations; |
| 2818 | extern const struct inode_operations simple_dir_inode_operations; | 2818 | extern const struct inode_operations simple_dir_inode_operations; |
| 2819 | extern void make_empty_dir_inode(struct inode *inode); | ||
| 2820 | extern bool is_empty_dir_inode(struct inode *inode); | ||
| 2819 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 2821 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
| 2820 | struct dentry *d_alloc_name(struct dentry *, const char *); | 2822 | struct dentry *d_alloc_name(struct dentry *, const char *); |
| 2821 | extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); | 2823 | extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); |
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index e6b2f7db9c0c..123be25ea15a 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
| @@ -45,6 +45,7 @@ enum kernfs_node_flag { | |||
| 45 | KERNFS_LOCKDEP = 0x0100, | 45 | KERNFS_LOCKDEP = 0x0100, |
| 46 | KERNFS_SUICIDAL = 0x0400, | 46 | KERNFS_SUICIDAL = 0x0400, |
| 47 | KERNFS_SUICIDED = 0x0800, | 47 | KERNFS_SUICIDED = 0x0800, |
| 48 | KERNFS_EMPTY_DIR = 0x1000, | ||
| 48 | }; | 49 | }; |
| 49 | 50 | ||
| 50 | /* @flags for kernfs_create_root() */ | 51 | /* @flags for kernfs_create_root() */ |
| @@ -286,6 +287,8 @@ void kernfs_destroy_root(struct kernfs_root *root); | |||
| 286 | struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent, | 287 | struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent, |
| 287 | const char *name, umode_t mode, | 288 | const char *name, umode_t mode, |
| 288 | void *priv, const void *ns); | 289 | void *priv, const void *ns); |
| 290 | struct kernfs_node *kernfs_create_empty_dir(struct kernfs_node *parent, | ||
| 291 | const char *name); | ||
| 289 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent, | 292 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent, |
| 290 | const char *name, | 293 | const char *name, |
| 291 | umode_t mode, loff_t size, | 294 | umode_t mode, loff_t size, |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 795d5fea5697..fa7bc29925c9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -188,6 +188,9 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, | |||
| 188 | void unregister_sysctl_table(struct ctl_table_header * table); | 188 | void unregister_sysctl_table(struct ctl_table_header * table); |
| 189 | 189 | ||
| 190 | extern int sysctl_init(void); | 190 | extern int sysctl_init(void); |
| 191 | |||
| 192 | extern struct ctl_table sysctl_mount_point[]; | ||
| 193 | |||
| 191 | #else /* CONFIG_SYSCTL */ | 194 | #else /* CONFIG_SYSCTL */ |
| 192 | static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) | 195 | static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) |
| 193 | { | 196 | { |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 99382c0df17e..9f65758311a4 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -210,6 +210,10 @@ int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, | |||
| 210 | int __must_check sysfs_move_dir_ns(struct kobject *kobj, | 210 | int __must_check sysfs_move_dir_ns(struct kobject *kobj, |
| 211 | struct kobject *new_parent_kobj, | 211 | struct kobject *new_parent_kobj, |
| 212 | const void *new_ns); | 212 | const void *new_ns); |
| 213 | int __must_check sysfs_create_mount_point(struct kobject *parent_kobj, | ||
| 214 | const char *name); | ||
| 215 | void sysfs_remove_mount_point(struct kobject *parent_kobj, | ||
| 216 | const char *name); | ||
| 213 | 217 | ||
| 214 | int __must_check sysfs_create_file_ns(struct kobject *kobj, | 218 | int __must_check sysfs_create_file_ns(struct kobject *kobj, |
| 215 | const struct attribute *attr, | 219 | const struct attribute *attr, |
| @@ -298,6 +302,17 @@ static inline int sysfs_move_dir_ns(struct kobject *kobj, | |||
| 298 | return 0; | 302 | return 0; |
| 299 | } | 303 | } |
| 300 | 304 | ||
| 305 | static inline int sysfs_create_mount_point(struct kobject *parent_kobj, | ||
| 306 | const char *name) | ||
| 307 | { | ||
| 308 | return 0; | ||
| 309 | } | ||
| 310 | |||
| 311 | static inline void sysfs_remove_mount_point(struct kobject *parent_kobj, | ||
| 312 | const char *name) | ||
| 313 | { | ||
| 314 | } | ||
| 315 | |||
| 301 | static inline int sysfs_create_file_ns(struct kobject *kobj, | 316 | static inline int sysfs_create_file_ns(struct kobject *kobj, |
| 302 | const struct attribute *attr, | 317 | const struct attribute *attr, |
| 303 | const void *ns) | 318 | const void *ns) |
