aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 15:27:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:08 -0400
commit608e266a2d4e62c1b98c1c573064b6afe8c06a58 (patch)
tree73d670ab6c315b42273bc9d2731ec2b8e7c199af /include/linux/sysfs.h
parentf0b0af4792d751106e2003f96af76fa95e10c68d (diff)
sysfs: make kobj point to sysfs_dirent instead of dentry
As kobj sysfs dentries and inodes are gonna be made reclaimable, dentry can't be used as naming token for sysfs file/directory, replace kobj->dentry with kobj->sd. The only external interface change is shadow directory handling. All other changes are contained in kobj and sysfs. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 2a6df6444e69..4c43030fae5d 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -19,6 +19,7 @@ struct kobject;
19struct module; 19struct module;
20struct nameidata; 20struct nameidata;
21struct dentry; 21struct dentry;
22struct sysfs_dirent;
22 23
23/* FIXME 24/* FIXME
24 * The *owner field is no longer used, but leave around 25 * The *owner field is no longer used, but leave around
@@ -92,13 +93,14 @@ extern int sysfs_schedule_callback(struct kobject *kobj,
92 void (*func)(void *), void *data, struct module *owner); 93 void (*func)(void *), void *data, struct module *owner);
93 94
94extern int __must_check 95extern int __must_check
95sysfs_create_dir(struct kobject *, struct dentry *); 96sysfs_create_dir(struct kobject *kobj, struct sysfs_dirent *shadow_parent_sd);
96 97
97extern void 98extern void
98sysfs_remove_dir(struct kobject *); 99sysfs_remove_dir(struct kobject *);
99 100
100extern int __must_check 101extern int __must_check
101sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); 102sysfs_rename_dir(struct kobject *kobj, struct sysfs_dirent *new_parent_sd,
103 const char *new_name);
102 104
103extern int __must_check 105extern int __must_check
104sysfs_move_dir(struct kobject *, struct kobject *); 106sysfs_move_dir(struct kobject *, struct kobject *);
@@ -138,8 +140,8 @@ void sysfs_notify(struct kobject * k, char *dir, char *attr);
138 140
139extern int sysfs_make_shadowed_dir(struct kobject *kobj, 141extern int sysfs_make_shadowed_dir(struct kobject *kobj,
140 void * (*follow_link)(struct dentry *, struct nameidata *)); 142 void * (*follow_link)(struct dentry *, struct nameidata *));
141extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); 143extern struct sysfs_dirent *sysfs_create_shadow_dir(struct kobject *kobj);
142extern void sysfs_remove_shadow_dir(struct dentry *dir); 144extern void sysfs_remove_shadow_dir(struct sysfs_dirent *shadow_sd);
143 145
144extern int __must_check sysfs_init(void); 146extern int __must_check sysfs_init(void);
145 147
@@ -151,7 +153,8 @@ static inline int sysfs_schedule_callback(struct kobject *kobj,
151 return -ENOSYS; 153 return -ENOSYS;
152} 154}
153 155
154static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) 156static inline int sysfs_create_dir(struct kobject *kobj,
157 struct sysfs_dirent *shadow_parent_sd)
155{ 158{
156 return 0; 159 return 0;
157} 160}
@@ -161,9 +164,9 @@ static inline void sysfs_remove_dir(struct kobject * k)
161 ; 164 ;
162} 165}
163 166
164static inline int sysfs_rename_dir(struct kobject * k, 167static inline int sysfs_rename_dir(struct kobject *kobj,
165 struct dentry *new_parent, 168 struct sysfs_dirent *new_parent_sd,
166 const char *new_name) 169 const char *new_name)
167{ 170{
168 return 0; 171 return 0;
169} 172}