]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/xfs/xfs_mount.c
Merge branch 'xfs-misc-fixes-4.6-2' into for-next
[mirror_ubuntu-bionic-kernel.git] / fs / xfs / xfs_mount.c
index 986290c4b7ab9fc753772ffe2d56015ef94e4643..536a0ee9cd5af1fbbc89960a597eb7158b676771 100644 (file)
@@ -185,9 +185,6 @@ xfs_initialize_perag(
        xfs_agnumber_t  index;
        xfs_agnumber_t  first_initialised = 0;
        xfs_perag_t     *pag;
-       xfs_agino_t     agino;
-       xfs_ino_t       ino;
-       xfs_sb_t        *sbp = &mp->m_sb;
        int             error = -ENOMEM;
 
        /*
@@ -230,22 +227,7 @@ xfs_initialize_perag(
                radix_tree_preload_end();
        }
 
-       /*
-        * If we mount with the inode64 option, or no inode overflows
-        * the legacy 32-bit address space clear the inode32 option.
-        */
-       agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks - 1, 0);
-       ino = XFS_AGINO_TO_INO(mp, agcount - 1, agino);
-
-       if ((mp->m_flags & XFS_MOUNT_SMALL_INUMS) && ino > XFS_MAXINUMBER_32)
-               mp->m_flags |= XFS_MOUNT_32BITINODES;
-       else
-               mp->m_flags &= ~XFS_MOUNT_32BITINODES;
-
-       if (mp->m_flags & XFS_MOUNT_32BITINODES)
-               index = xfs_set_inode32(mp, agcount);
-       else
-               index = xfs_set_inode64(mp, agcount);
+       index = xfs_set_inode_alloc(mp, agcount);
 
        if (maxagi)
                *maxagi = index;