aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-12-12 23:51:46 -0500
committerDave Chinner <david@fromorbit.com>2013-12-12 23:51:46 -0500
commit717834383c6ad2173323b823b97c521c9fb8fbbb (patch)
tree92a8eeb2604dac3e2cceefeda560d7cf7231e262 /fs/xfs/xfs_ialloc.c
parentf9b395a8ef8f34d19cae2cde361e19c96e097fad (diff)
xfs: get rid of XFS_IALLOC_INODES macros
Get rid of XFS_IALLOC_INODES() marcos, use mp->m_ialloc_inos directly. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 7a728f9fc0be..2f87a53f74fe 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -225,7 +225,7 @@ xfs_ialloc_inode_init(
225 * they track in the AIL as if they were physically logged. 225 * they track in the AIL as if they were physically logged.
226 */ 226 */
227 if (tp) 227 if (tp)
228 xfs_icreate_log(tp, agno, agbno, XFS_IALLOC_INODES(mp), 228 xfs_icreate_log(tp, agno, agbno, mp->m_ialloc_inos,
229 mp->m_sb.sb_inodesize, length, gen); 229 mp->m_sb.sb_inodesize, length, gen);
230 } else if (xfs_sb_version_hasnlink(&mp->m_sb)) 230 } else if (xfs_sb_version_hasnlink(&mp->m_sb))
231 version = 2; 231 version = 2;
@@ -329,7 +329,7 @@ xfs_ialloc_ag_alloc(
329 * Locking will ensure that we don't have two callers in here 329 * Locking will ensure that we don't have two callers in here
330 * at one time. 330 * at one time.
331 */ 331 */
332 newlen = XFS_IALLOC_INODES(args.mp); 332 newlen = args.mp->m_ialloc_inos;
333 if (args.mp->m_maxicount && 333 if (args.mp->m_maxicount &&
334 args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount) 334 args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount)
335 return XFS_ERROR(ENOSPC); 335 return XFS_ERROR(ENOSPC);
@@ -999,7 +999,7 @@ xfs_dialloc(
999 * inode. 999 * inode.
1000 */ 1000 */
1001 if (mp->m_maxicount && 1001 if (mp->m_maxicount &&
1002 mp->m_sb.sb_icount + XFS_IALLOC_INODES(mp) > mp->m_maxicount) { 1002 mp->m_sb.sb_icount + mp->m_ialloc_inos > mp->m_maxicount) {
1003 noroom = 1; 1003 noroom = 1;
1004 okalloc = 0; 1004 okalloc = 0;
1005 } 1005 }
@@ -1202,7 +1202,7 @@ xfs_difree(
1202 * When an inode cluster is free, it becomes eligible for removal 1202 * When an inode cluster is free, it becomes eligible for removal
1203 */ 1203 */
1204 if (!(mp->m_flags & XFS_MOUNT_IKEEP) && 1204 if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
1205 (rec.ir_freecount == XFS_IALLOC_INODES(mp))) { 1205 (rec.ir_freecount == mp->m_ialloc_inos)) {
1206 1206
1207 *delete = 1; 1207 *delete = 1;
1208 *first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino); 1208 *first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino);
@@ -1212,7 +1212,7 @@ xfs_difree(
1212 * AGI and Superblock inode counts, and mark the disk space 1212 * AGI and Superblock inode counts, and mark the disk space
1213 * to be freed when the transaction is committed. 1213 * to be freed when the transaction is committed.
1214 */ 1214 */
1215 ilen = XFS_IALLOC_INODES(mp); 1215 ilen = mp->m_ialloc_inos;
1216 be32_add_cpu(&agi->agi_count, -ilen); 1216 be32_add_cpu(&agi->agi_count, -ilen);
1217 be32_add_cpu(&agi->agi_freecount, -(ilen - 1)); 1217 be32_add_cpu(&agi->agi_freecount, -(ilen - 1));
1218 xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); 1218 xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT);
@@ -1311,7 +1311,7 @@ xfs_imap_lookup(
1311 1311
1312 /* check that the returned record contains the required inode */ 1312 /* check that the returned record contains the required inode */
1313 if (rec.ir_startino > agino || 1313 if (rec.ir_startino > agino ||
1314 rec.ir_startino + XFS_IALLOC_INODES(mp) <= agino) 1314 rec.ir_startino + mp->m_ialloc_inos <= agino)
1315 return EINVAL; 1315 return EINVAL;
1316 1316
1317 /* for untrusted inodes check it is allocated first */ 1317 /* for untrusted inodes check it is allocated first */