From 7cff3ad62b0f9916d8428bc1891bca144ee8c722 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 18 Jul 2007 14:29:06 +0900 Subject: [PATCH] --- yaml --- r: 61465 b: refs/heads/master c: e080e436f605877e47e4950f5386ed843badbb1b h: refs/heads/master i: 61463: 2cd0979707fe1aa840c4cc77df126c88534f7c01 v: v3 --- [refs] | 2 +- trunk/fs/sysfs/mount.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 29eb5ef10208..0952830dcf92 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2c19c49a59ccf2162c0eb999de1ec60c0e07a533 +refs/heads/master: e080e436f605877e47e4950f5386ed843badbb1b diff --git a/trunk/fs/sysfs/mount.c b/trunk/fs/sysfs/mount.c index 402cc356203c..60714d075c2f 100644 --- a/trunk/fs/sysfs/mount.c +++ b/trunk/fs/sysfs/mount.c @@ -43,19 +43,19 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent) sb->s_time_gran = 1; sysfs_sb = sb; - inode = new_inode(sysfs_sb); + /* get root inode, initialize and unlock it */ + inode = sysfs_get_inode(&sysfs_root); if (!inode) { pr_debug("sysfs: could not get root inode\n"); return -ENOMEM; } - sysfs_init_inode(&sysfs_root, inode); - inode->i_op = &sysfs_dir_inode_operations; inode->i_fop = &sysfs_dir_operations; - /* directory inodes start off with i_nlink == 2 (for "." entry) */ - inc_nlink(inode); + inc_nlink(inode); /* directory, account for "." */ + unlock_new_inode(inode); + /* instantiate and link root dentry */ root = d_alloc_root(inode); if (!root) { pr_debug("%s: could not get root dentry!\n",__FUNCTION__);