提交 1688f860 编写于 作者: A Al Viro

fat: switch to d_make_root()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 ea29c695
...@@ -1496,11 +1496,13 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1496,11 +1496,13 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
root_inode->i_ino = MSDOS_ROOT_INO; root_inode->i_ino = MSDOS_ROOT_INO;
root_inode->i_version = 1; root_inode->i_version = 1;
error = fat_read_root(root_inode); error = fat_read_root(root_inode);
if (error < 0) if (error < 0) {
iput(root_inode);
goto out_fail; goto out_fail;
}
error = -ENOMEM; error = -ENOMEM;
insert_inode_hash(root_inode); insert_inode_hash(root_inode);
sb->s_root = d_alloc_root(root_inode); sb->s_root = d_make_root(root_inode);
if (!sb->s_root) { if (!sb->s_root) {
fat_msg(sb, KERN_ERR, "get root inode failed"); fat_msg(sb, KERN_ERR, "get root inode failed");
goto out_fail; goto out_fail;
...@@ -1516,8 +1518,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, ...@@ -1516,8 +1518,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
out_fail: out_fail:
if (fat_inode) if (fat_inode)
iput(fat_inode); iput(fat_inode);
if (root_inode)
iput(root_inode);
unload_nls(sbi->nls_io); unload_nls(sbi->nls_io);
unload_nls(sbi->nls_disk); unload_nls(sbi->nls_disk);
if (sbi->options.iocharset != fat_default_iocharset) if (sbi->options.iocharset != fat_default_iocharset)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册