summaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-02-12 22:06:33 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:36 -0400
commit1688f86046e5572623b2eacb685eb707fe21fb0a (patch)
tree5a2c3b39a26fb5866f415a7190855cb74479daac /fs/fat
parentea29c6950a0305f2af7fd4a2021a6e946ada0174 (diff)
downloadlinux-stable-1688f86046e5572623b2eacb685eb707fe21fb0a.tar.gz
linux-stable-1688f86046e5572623b2eacb685eb707fe21fb0a.tar.bz2
linux-stable-1688f86046e5572623b2eacb685eb707fe21fb0a.zip
fat: switch to d_make_root()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 3ab841054d53..21687e31acc0 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -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_version = 1;
error = fat_read_root(root_inode);
- if (error < 0)
+ if (error < 0) {
+ iput(root_inode);
goto out_fail;
+ }
error = -ENOMEM;
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) {
fat_msg(sb, KERN_ERR, "get root inode failed");
goto out_fail;
@@ -1516,8 +1518,6 @@ out_invalid:
out_fail:
if (fat_inode)
iput(fat_inode);
- if (root_inode)
- iput(root_inode);
unload_nls(sbi->nls_io);
unload_nls(sbi->nls_disk);
if (sbi->options.iocharset != fat_default_iocharset)