From c8b2acc740c66f601d300eec8a112c4c5a2d516f Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 14 Jun 2007 03:45:13 +0900 Subject: [PATCH] --- yaml --- r: 59111 b: refs/heads/master c: fa7f912ad4ae0ed7591add52422e48282389652d h: refs/heads/master i: 59109: e8e586505410ff08ed6a204afa1cf20ed4f5ec12 59107: d15f285fd41b6670086209d4804958c2cbe76f6c 59103: e33a4e4ad992128d993d54ac249f55c94cef2eb6 v: v3 --- [refs] | 2 +- trunk/fs/sysfs/dir.c | 12 ++++++++++++ trunk/fs/sysfs/sysfs.h | 13 +------------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index b1aa85831325..63091b05876a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72dba584b695d8bc8c1a50ed54ad4cba7c62314d +refs/heads/master: fa7f912ad4ae0ed7591add52422e48282389652d diff --git a/trunk/fs/sysfs/dir.c b/trunk/fs/sysfs/dir.c index c4342a019972..2544aae6f583 100644 --- a/trunk/fs/sysfs/dir.c +++ b/trunk/fs/sysfs/dir.c @@ -15,6 +15,18 @@ DECLARE_RWSEM(sysfs_rename_sem); spinlock_t sysfs_lock = SPIN_LOCK_UNLOCKED; +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 void sysfs_d_iput(struct dentry * dentry, struct inode * inode) { struct sysfs_dirent * sd = dentry->d_fsdata; diff --git a/trunk/fs/sysfs/sysfs.h b/trunk/fs/sysfs/sysfs.h index 502c949c402d..687d959f606d 100644 --- a/trunk/fs/sysfs/sysfs.h +++ b/trunk/fs/sysfs/sysfs.h @@ -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) {