aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 14:45:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:03 -0400
commitfa7f912ad4ae0ed7591add52422e48282389652d (patch)
tree2f986dbf55002e32d6d296a1b5b96d55135ad28f /fs/sysfs/sysfs.h
parent72dba584b695d8bc8c1a50ed54ad4cba7c62314d (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.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) {