diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 14:45:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:03 -0400 |
commit | fa7f912ad4ae0ed7591add52422e48282389652d (patch) | |
tree | 2f986dbf55002e32d6d296a1b5b96d55135ad28f /fs/sysfs/sysfs.h | |
parent | 72dba584b695d8bc8c1a50ed54ad4cba7c62314d (diff) |
sysfs: move release_sysfs_dirent() to dir.c
There is no reason this function should be inlined and soon to follow
sysfs object reference simplification will make it heavier. Move it
to dir.c.
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.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) { |