diff options
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r-- | fs/hugetlbfs/inode.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 1e85a7ac0217..81932fa1861a 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -831,8 +831,6 @@ bad_val: | |||
831 | static int | 831 | static int |
832 | hugetlbfs_fill_super(struct super_block *sb, void *data, int silent) | 832 | hugetlbfs_fill_super(struct super_block *sb, void *data, int silent) |
833 | { | 833 | { |
834 | struct inode * inode; | ||
835 | struct dentry * root; | ||
836 | int ret; | 834 | int ret; |
837 | struct hugetlbfs_config config; | 835 | struct hugetlbfs_config config; |
838 | struct hugetlbfs_sb_info *sbinfo; | 836 | struct hugetlbfs_sb_info *sbinfo; |
@@ -865,16 +863,9 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent) | |||
865 | sb->s_magic = HUGETLBFS_MAGIC; | 863 | sb->s_magic = HUGETLBFS_MAGIC; |
866 | sb->s_op = &hugetlbfs_ops; | 864 | sb->s_op = &hugetlbfs_ops; |
867 | sb->s_time_gran = 1; | 865 | sb->s_time_gran = 1; |
868 | inode = hugetlbfs_get_root(sb, &config); | 866 | sb->s_root = d_make_root(hugetlbfs_get_root(sb, &config)); |
869 | if (!inode) | 867 | if (!sb->s_root) |
870 | goto out_free; | ||
871 | |||
872 | root = d_alloc_root(inode); | ||
873 | if (!root) { | ||
874 | iput(inode); | ||
875 | goto out_free; | 868 | goto out_free; |
876 | } | ||
877 | sb->s_root = root; | ||
878 | return 0; | 869 | return 0; |
879 | out_free: | 870 | out_free: |
880 | kfree(sbinfo); | 871 | kfree(sbinfo); |