aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-05-13 17:31:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-21 13:10:01 -0400
commit9924f6e89823a41bfd272ab759636276b9f9ee9c (patch)
treeee65aa6c9130c1ad0bfc630d8bf7112ae1fde160 /include/linux/sysfs.h
parent80c298105bf80e33ae494eaeba51f00352b5373c (diff)
sysfs: Add support for permanently empty directories to serve as mount points.
commit 87d2846fcf88113fae2341da1ca9a71f0d916f2c upstream. Add two functions sysfs_create_mount_point and sysfs_remove_mount_point that hang a permanently empty directory off of a kobject or remove a permanently emptpy directory hanging from a kobject. Export these new functions so modular filesystems can use them. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h15
1 files changed, 15 insertions, 0 deletions
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,
210int __must_check sysfs_move_dir_ns(struct kobject *kobj, 210int __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);
213int __must_check sysfs_create_mount_point(struct kobject *parent_kobj,
214 const char *name);
215void sysfs_remove_mount_point(struct kobject *parent_kobj,
216 const char *name);
213 217
214int __must_check sysfs_create_file_ns(struct kobject *kobj, 218int __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
305static inline int sysfs_create_mount_point(struct kobject *parent_kobj,
306 const char *name)
307{
308 return 0;
309}
310
311static inline void sysfs_remove_mount_point(struct kobject *parent_kobj,
312 const char *name)
313{
314}
315
301static inline int sysfs_create_file_ns(struct kobject *kobj, 316static 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)