summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 19:46:24 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2018-12-12 19:47:16 +0300
commit43004b2a8da2652b5ec526269a8acfba7d3d219c (patch)
tree197c76e61334c576f18530dd05a86958aac4101e /fs/xfs/xfs_inode.c
parent7280fedaf3a0f9097c0621c7d5b35849954d7f54 (diff)
downloadlinux-43004b2a8da2652b5ec526269a8acfba7d3d219c.tar.xz
xfs: add a block to inode count converter
Add new helpers to convert units of fs blocks into inodes, and AG blocks into AG inodes, respectively. Convert all the open-coded conversions and XFS_OFFBNO_TO_AGINO(, , 0) calls to use them, as appropriate. The OFFBNO_TO_AGINO macro is retained for xfs_repair. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index f21756751540..801eb891d0fd 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2200,7 +2200,7 @@ xfs_ifree_cluster(
inum = xic->first_ino;
pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, inum));
blks_per_cluster = xfs_icluster_size_fsb(mp);
- inodes_per_cluster = blks_per_cluster << mp->m_sb.sb_inopblog;
+ inodes_per_cluster = XFS_FSB_TO_INO(mp, blks_per_cluster);
nbufs = mp->m_ialloc_blks / blks_per_cluster;
for (j = 0; j < nbufs; j++, inum += inodes_per_cluster) {