diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-07-31 06:15:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:51:03 -0400 |
commit | 90bc61359de0148f8627073d68a22edc7ed9893d (patch) | |
tree | b054bf0cb9bda41dab498086216f4c0253b2c5ed /include/linux | |
parent | 869512ab5ab93e5e82ad7d4aaf4ed098d23bfc3f (diff) |
sysfs: Remove first pass at shadow directory support
While shadow directories appear to be a good idea, the current scheme
of controlling their creation and destruction outside of sysfs appears
to be a locking and maintenance nightmare in the face of sysfs
directories dynamically coming and going. Which can now occur for
directories containing network devices when CONFIG_SYSFS_DEPRECATED is
not set.
This patch removes everything from the initial shadow directory support
that allowed the shadow directory creation to be controlled at a higher
level. So except for a few bits of sysfs_rename_dir everything from
commit b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 is now gone.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kobject.h | 5 | ||||
-rw-r--r-- | include/linux/sysfs.h | 27 |
2 files changed, 4 insertions, 28 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 8b45946e8506..56f5eaf10ea9 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -84,14 +84,9 @@ extern void kobject_init(struct kobject *); | |||
84 | extern void kobject_cleanup(struct kobject *); | 84 | extern void kobject_cleanup(struct kobject *); |
85 | 85 | ||
86 | extern int __must_check kobject_add(struct kobject *); | 86 | extern int __must_check kobject_add(struct kobject *); |
87 | extern int __must_check kobject_shadow_add(struct kobject *kobj, | ||
88 | struct sysfs_dirent *shadow_parent); | ||
89 | extern void kobject_del(struct kobject *); | 87 | extern void kobject_del(struct kobject *); |
90 | 88 | ||
91 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 89 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
92 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | ||
93 | struct sysfs_dirent *new_parent, | ||
94 | const char *new_name); | ||
95 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 90 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
96 | 91 | ||
97 | extern int __must_check kobject_register(struct kobject *); | 92 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index be8228e50a27..c16e4c511621 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,9 +17,6 @@ | |||
17 | 17 | ||
18 | struct kobject; | 18 | struct kobject; |
19 | struct module; | 19 | struct module; |
20 | struct nameidata; | ||
21 | struct dentry; | ||
22 | struct sysfs_dirent; | ||
23 | 20 | ||
24 | /* FIXME | 21 | /* FIXME |
25 | * The *owner field is no longer used, but leave around | 22 | * The *owner field is no longer used, but leave around |
@@ -94,14 +91,13 @@ extern int sysfs_schedule_callback(struct kobject *kobj, | |||
94 | void (*func)(void *), void *data, struct module *owner); | 91 | void (*func)(void *), void *data, struct module *owner); |
95 | 92 | ||
96 | extern int __must_check | 93 | extern int __must_check |
97 | sysfs_create_dir(struct kobject *kobj, struct sysfs_dirent *shadow_parent_sd); | 94 | sysfs_create_dir(struct kobject *); |
98 | 95 | ||
99 | extern void | 96 | extern void |
100 | sysfs_remove_dir(struct kobject *); | 97 | sysfs_remove_dir(struct kobject *); |
101 | 98 | ||
102 | extern int __must_check | 99 | extern int __must_check |
103 | sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd, | 100 | sysfs_rename_dir(struct kobject *kobj, const char *new_name); |
104 | const char *new_name); | ||
105 | 101 | ||
106 | extern int __must_check | 102 | extern int __must_check |
107 | sysfs_move_dir(struct kobject *, struct kobject *); | 103 | sysfs_move_dir(struct kobject *, struct kobject *); |
@@ -138,12 +134,6 @@ void sysfs_remove_file_from_group(struct kobject *kobj, | |||
138 | 134 | ||
139 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 135 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
140 | 136 | ||
141 | |||
142 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
143 | void * (*follow_link)(struct dentry *, struct nameidata *)); | ||
144 | extern struct sysfs_dirent *sysfs_create_shadow_dir(struct kobject *kobj); | ||
145 | extern void sysfs_remove_shadow_dir(struct sysfs_dirent *shadow_sd); | ||
146 | |||
147 | extern int __must_check sysfs_init(void); | 137 | extern int __must_check sysfs_init(void); |
148 | 138 | ||
149 | #else /* CONFIG_SYSFS */ | 139 | #else /* CONFIG_SYSFS */ |
@@ -154,8 +144,7 @@ static inline int sysfs_schedule_callback(struct kobject *kobj, | |||
154 | return -ENOSYS; | 144 | return -ENOSYS; |
155 | } | 145 | } |
156 | 146 | ||
157 | static inline int sysfs_create_dir(struct kobject *kobj, | 147 | static inline int sysfs_create_dir(struct kobject * kobj) |
158 | struct sysfs_dirent *shadow_parent_sd) | ||
159 | { | 148 | { |
160 | return 0; | 149 | return 0; |
161 | } | 150 | } |
@@ -165,9 +154,7 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
165 | ; | 154 | ; |
166 | } | 155 | } |
167 | 156 | ||
168 | static inline int sysfs_rename_dir(struct kobject *kobj, | 157 | static inline int sysfs_rename_dir(struct kobject * kobj, const char *new_name) |
169 | struct sysfs_dirent *new_parent_sd, | ||
170 | const char *new_name) | ||
171 | { | 158 | { |
172 | return 0; | 159 | return 0; |
173 | } | 160 | } |
@@ -242,12 +229,6 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | |||
242 | { | 229 | { |
243 | } | 230 | } |
244 | 231 | ||
245 | static inline int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
246 | void * (*follow_link)(struct dentry *, struct nameidata *)) | ||
247 | { | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static inline int __must_check sysfs_init(void) | 232 | static inline int __must_check sysfs_init(void) |
252 | { | 233 | { |
253 | return 0; | 234 | return 0; |