|
@@ -18,6 +18,7 @@ extern void sysfs_delete_inode(struct inode *inode);
|
|
|
extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *);
|
|
|
extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *));
|
|
|
|
|
|
+extern void release_sysfs_dirent(struct sysfs_dirent * sd);
|
|
|
extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *);
|
|
|
extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *,
|
|
|
umode_t, int);
|
|
@@ -99,18 +100,6 @@ static inline struct kobject *sysfs_get_kobject(struct dentry *dentry)
|
|
|
return kobj;
|
|
|
}
|
|
|
|
|
|
-static inline void release_sysfs_dirent(struct sysfs_dirent * sd)
|
|
|
-{
|
|
|
- if (sd->s_type & SYSFS_KOBJ_LINK) {
|
|
|
- struct sysfs_symlink * sl = sd->s_element;
|
|
|
- kfree(sl->link_name);
|
|
|
- kobject_put(sl->target_kobj);
|
|
|
- kfree(sl);
|
|
|
- }
|
|
|
- kfree(sd->s_iattr);
|
|
|
- kmem_cache_free(sysfs_dir_cachep, sd);
|
|
|
-}
|
|
|
-
|
|
|
static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd)
|
|
|
{
|
|
|
if (sd) {
|