diff options
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 13 |
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); | |||
18 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); | 18 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); |
19 | extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); | 19 | extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); |
20 | 20 | ||
21 | extern void release_sysfs_dirent(struct sysfs_dirent * sd); | ||
21 | extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *); | 22 | extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *); |
22 | extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *, | 23 | extern 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 | ||
102 | static 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 | |||
114 | static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd) | 103 | static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd) |
115 | { | 104 | { |
116 | if (sd) { | 105 | if (sd) { |