浏览代码

sysfs: fix root sysfs_dirent -> root dentry association

The root sysfs_dirent didn't point to the root dentry fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tejun Heo 18 年之前
父节点
当前提交
0b8ead82f5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/sysfs/mount.c

+ 1 - 0
fs/sysfs/mount.c

@@ -65,6 +65,7 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
 		iput(inode);
 		iput(inode);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
+	sysfs_root.s_dentry = root;
 	root->d_fsdata = &sysfs_root;
 	root->d_fsdata = &sysfs_root;
 	sb->s_root = root;
 	sb->s_root = root;
 	return 0;
 	return 0;