aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/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 /fs/sysfs/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 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index f1629b4520aa..27a5f4b4e3b0 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -69,12 +69,14 @@ extern void sysfs_attach_dirent(struct sysfs_dirent *sd,
69 struct sysfs_dirent *parent_sd, 69 struct sysfs_dirent *parent_sd,
70 struct dentry *dentry); 70 struct dentry *dentry);
71 71
72extern int sysfs_add_file(struct dentry *, const struct attribute *, int); 72extern int sysfs_add_file(struct sysfs_dirent *dir_sd,
73extern int sysfs_hash_and_remove(struct dentry * dir, const char * name); 73 const struct attribute *attr, int type);
74extern int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name);
74extern struct sysfs_dirent *sysfs_find(struct sysfs_dirent *dir, const char * name); 75extern struct sysfs_dirent *sysfs_find(struct sysfs_dirent *dir, const char * name);
75 76
76extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **); 77extern int sysfs_create_subdir(struct kobject *kobj, const char *name,
77extern void sysfs_remove_subdir(struct dentry *); 78 struct sysfs_dirent **p_sd);
79extern void sysfs_remove_subdir(struct sysfs_dirent *sd);
78 80
79extern void sysfs_drop_dentry(struct sysfs_dirent *sd); 81extern void sysfs_drop_dentry(struct sysfs_dirent *sd);
80extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); 82extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr);