mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
sysfs: Add support for permanently empty directories to serve as mount points.
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. Cc: stable@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
@@ -210,6 +210,10 @@ int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name,
|
||||
int __must_check sysfs_move_dir_ns(struct kobject *kobj,
|
||||
struct kobject *new_parent_kobj,
|
||||
const void *new_ns);
|
||||
int __must_check sysfs_create_mount_point(struct kobject *parent_kobj,
|
||||
const char *name);
|
||||
void sysfs_remove_mount_point(struct kobject *parent_kobj,
|
||||
const char *name);
|
||||
|
||||
int __must_check sysfs_create_file_ns(struct kobject *kobj,
|
||||
const struct attribute *attr,
|
||||
@@ -298,6 +302,17 @@ static inline int sysfs_move_dir_ns(struct kobject *kobj,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int sysfs_create_mount_point(struct kobject *parent_kobj,
|
||||
const char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void sysfs_remove_mount_point(struct kobject *parent_kobj,
|
||||
const char *name)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int sysfs_create_file_ns(struct kobject *kobj,
|
||||
const struct attribute *attr,
|
||||
const void *ns)
|
||||
|
Reference in New Issue
Block a user