You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
sysfs: Implement sysfs_rename_link
Because of rename ordering problems we occassionally give false warnings about invalid sysfs operations. So using sysfs_rename create a sysfs_rename_link function that doesn't need strange workarounds. Cc: Benjamin Thery <benjamin.thery@bull.net> Cc: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
19c38b632d
commit
7cb32942d9
@@ -151,6 +151,9 @@ int __must_check sysfs_create_link_nowarn(struct kobject *kobj,
|
||||
const char *name);
|
||||
void sysfs_remove_link(struct kobject *kobj, const char *name);
|
||||
|
||||
int sysfs_rename_link(struct kobject *kobj, struct kobject *target,
|
||||
const char *old_name, const char *new_name);
|
||||
|
||||
int __must_check sysfs_create_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp);
|
||||
int sysfs_update_group(struct kobject *kobj,
|
||||
@@ -255,6 +258,12 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int sysfs_rename_link(struct kobject *k, struct kobject *t,
|
||||
const char *old_name, const char *new_name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int sysfs_create_group(struct kobject *kobj,
|
||||
const struct attribute_group *grp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user