Merge branch 'akpm' (Andrew's patch-bomb)
[profile/ivi/kernel-x86-ivi.git] / fs / hugetlbfs / inode.c
index 2691633..ea25174 100644 (file)
@@ -860,8 +860,6 @@ bad_val:
 static int
 hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
 {
-       struct inode * inode;
-       struct dentry * root;
        int ret;
        struct hugetlbfs_config config;
        struct hugetlbfs_sb_info *sbinfo;
@@ -898,16 +896,9 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
        sb->s_magic = HUGETLBFS_MAGIC;
        sb->s_op = &hugetlbfs_ops;
        sb->s_time_gran = 1;
-       inode = hugetlbfs_get_root(sb, &config);
-       if (!inode)
-               goto out_free;
-
-       root = d_alloc_root(inode);
-       if (!root) {
-               iput(inode);
+       sb->s_root = d_make_root(hugetlbfs_get_root(sb, &config));
+       if (!sb->s_root)
                goto out_free;
-       }
-       sb->s_root = root;
        return 0;
 out_free:
        if (sbinfo->spool)