aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index bb753b359bee..536a0ee9cd5a 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -185,9 +185,6 @@ xfs_initialize_perag(
185 xfs_agnumber_t index; 185 xfs_agnumber_t index;
186 xfs_agnumber_t first_initialised = 0; 186 xfs_agnumber_t first_initialised = 0;
187 xfs_perag_t *pag; 187 xfs_perag_t *pag;
188 xfs_agino_t agino;
189 xfs_ino_t ino;
190 xfs_sb_t *sbp = &mp->m_sb;
191 int error = -ENOMEM; 188 int error = -ENOMEM;
192 189
193 /* 190 /*
@@ -230,22 +227,7 @@ xfs_initialize_perag(
230 radix_tree_preload_end(); 227 radix_tree_preload_end();
231 } 228 }
232 229
233 /* 230 index = xfs_set_inode_alloc(mp, agcount);
234 * If we mount with the inode64 option, or no inode overflows
235 * the legacy 32-bit address space clear the inode32 option.
236 */
237 agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks - 1, 0);
238 ino = XFS_AGINO_TO_INO(mp, agcount - 1, agino);
239
240 if ((mp->m_flags & XFS_MOUNT_SMALL_INUMS) && ino > XFS_MAXINUMBER_32)
241 mp->m_flags |= XFS_MOUNT_32BITINODES;
242 else
243 mp->m_flags &= ~XFS_MOUNT_32BITINODES;
244
245 if (mp->m_flags & XFS_MOUNT_32BITINODES)
246 index = xfs_set_inode32(mp, agcount);
247 else
248 index = xfs_set_inode64(mp, agcount);
249 231
250 if (maxagi) 232 if (maxagi)
251 *maxagi = index; 233 *maxagi = index;
@@ -865,7 +847,7 @@ xfs_mountfs(
865 847
866 ASSERT(rip != NULL); 848 ASSERT(rip != NULL);
867 849
868 if (unlikely(!S_ISDIR(rip->i_d.di_mode))) { 850 if (unlikely(!S_ISDIR(VFS_I(rip)->i_mode))) {
869 xfs_warn(mp, "corrupted root inode %llu: not a directory", 851 xfs_warn(mp, "corrupted root inode %llu: not a directory",
870 (unsigned long long)rip->i_ino); 852 (unsigned long long)rip->i_ino);
871 xfs_iunlock(rip, XFS_ILOCK_EXCL); 853 xfs_iunlock(rip, XFS_ILOCK_EXCL);
@@ -1284,7 +1266,7 @@ xfs_getsb(
1284 } 1266 }
1285 1267
1286 xfs_buf_hold(bp); 1268 xfs_buf_hold(bp);
1287 ASSERT(XFS_BUF_ISDONE(bp)); 1269 ASSERT(bp->b_flags & XBF_DONE);
1288 return bp; 1270 return bp;
1289} 1271}
1290 1272