diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2010-02-12 22:22:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-07 20:04:52 -0500 |
commit | 7cb32942d91a501b2df944928ccc9e6590ab237b (patch) | |
tree | 7c6ff2a82705d7dda8a566702f3bab981d03bf54 /include/linux/sysfs.h | |
parent | 19c38b632d4554329986021fd66bdea468cf452c (diff) |
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>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r-- | include/linux/sysfs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 5b8f80f5aca6..d77cde6d0498 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -151,6 +151,9 @@ int __must_check sysfs_create_link_nowarn(struct kobject *kobj, | |||
151 | const char *name); | 151 | const char *name); |
152 | void sysfs_remove_link(struct kobject *kobj, const char *name); | 152 | void sysfs_remove_link(struct kobject *kobj, const char *name); |
153 | 153 | ||
154 | int sysfs_rename_link(struct kobject *kobj, struct kobject *target, | ||
155 | const char *old_name, const char *new_name); | ||
156 | |||
154 | int __must_check sysfs_create_group(struct kobject *kobj, | 157 | int __must_check sysfs_create_group(struct kobject *kobj, |
155 | const struct attribute_group *grp); | 158 | const struct attribute_group *grp); |
156 | int sysfs_update_group(struct kobject *kobj, | 159 | int sysfs_update_group(struct kobject *kobj, |
@@ -255,6 +258,12 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name) | |||
255 | { | 258 | { |
256 | } | 259 | } |
257 | 260 | ||
261 | static inline int sysfs_rename_link(struct kobject *k, struct kobject *t, | ||
262 | const char *old_name, const char *new_name) | ||
263 | { | ||
264 | return 0; | ||
265 | } | ||
266 | |||
258 | static inline int sysfs_create_group(struct kobject *kobj, | 267 | static inline int sysfs_create_group(struct kobject *kobj, |
259 | const struct attribute_group *grp) | 268 | const struct attribute_group *grp) |
260 | { | 269 | { |