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/dir.c | |
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/dir.c')
-rw-r--r-- | fs/sysfs/dir.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index c4342a019972..2544aae6f583 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -15,6 +15,18 @@ | |||
15 | DECLARE_RWSEM(sysfs_rename_sem); | 15 | DECLARE_RWSEM(sysfs_rename_sem); |
16 | spinlock_t sysfs_lock = SPIN_LOCK_UNLOCKED; | 16 | spinlock_t sysfs_lock = SPIN_LOCK_UNLOCKED; |
17 | 17 | ||
18 | void release_sysfs_dirent(struct sysfs_dirent * sd) | ||
19 | { | ||
20 | if (sd->s_type & SYSFS_KOBJ_LINK) { | ||
21 | struct sysfs_symlink * sl = sd->s_element; | ||
22 | kfree(sl->link_name); | ||
23 | kobject_put(sl->target_kobj); | ||
24 | kfree(sl); | ||
25 | } | ||
26 | kfree(sd->s_iattr); | ||
27 | kmem_cache_free(sysfs_dir_cachep, sd); | ||
28 | } | ||
29 | |||
18 | static void sysfs_d_iput(struct dentry * dentry, struct inode * inode) | 30 | static void sysfs_d_iput(struct dentry * dentry, struct inode * inode) |
19 | { | 31 | { |
20 | struct sysfs_dirent * sd = dentry->d_fsdata; | 32 | struct sysfs_dirent * sd = dentry->d_fsdata; |