summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-14 03:45:16 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 16:09:05 -0700
commit198a2a847015805c6f57d8cc732bdaaccb494007 (patch)
tree614aa44e1bd1ab31a5baaab717c3af95773bd06b /fs/sysfs/inode.c
parent73107cb3ad3963c0f929ae681c05081eafb1c079 (diff)
downloadlinux-198a2a847015805c6f57d8cc732bdaaccb494007.tar.gz
linux-198a2a847015805c6f57d8cc732bdaaccb494007.tar.bz2
linux-198a2a847015805c6f57d8cc732bdaaccb494007.zip
sysfs: separate out sysfs_attach_dentry()
Consolidate sd <-> dentry association into sysfs_attach_dentry() and call it after dentry and inode are properly set up. This is in preparation of sysfs_drop_dentry() updates. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index d9ccc830b73a..88857a399d0c 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -156,13 +156,13 @@ struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd)
return inode;
}
-int sysfs_create(struct dentry * dentry, int mode, int (*init)(struct inode *))
+int sysfs_create(struct sysfs_dirent *sd, struct dentry *dentry, int mode,
+ int (*init)(struct inode *))
{
int error = 0;
struct inode * inode = NULL;
if (dentry) {
if (!dentry->d_inode) {
- struct sysfs_dirent * sd = dentry->d_fsdata;
if ((inode = sysfs_new_inode(mode, sd))) {
if (dentry->d_parent && dentry->d_parent->d_inode) {
struct inode *p_inode = dentry->d_parent->d_inode;