aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 502c949c402d..687d959f606d 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -18,6 +18,7 @@ extern void sysfs_delete_inode(struct inode *inode);
18extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); 18extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *);
19extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); 19extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *));
20 20
21extern void release_sysfs_dirent(struct sysfs_dirent * sd);
21extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *); 22extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *);
22extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *, 23extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *,
23 umode_t, int); 24 umode_t, int);
@@ -99,18 +100,6 @@ static inline struct kobject *sysfs_get_kobject(struct dentry *dentry)
99 return kobj; 100 return kobj;
100} 101}
101 102
102static inline void release_sysfs_dirent(struct sysfs_dirent * sd)
103{
104 if (sd->s_type & SYSFS_KOBJ_LINK) {
105 struct sysfs_symlink * sl = sd->s_element;
106 kfree(sl->link_name);
107 kobject_put(sl->target_kobj);
108 kfree(sl);
109 }
110 kfree(sd->s_iattr);
111 kmem_cache_free(sysfs_dir_cachep, sd);
112}
113
114static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd) 103static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd)
115{ 104{
116 if (sd) { 105 if (sd) {