Merge tag 'hwmon-for-v5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
[linux-2.6-microblaze.git] / fs / xfs / xfs_itable.c
index e9508ba..942e4aa 100644 (file)
@@ -167,20 +167,18 @@ xfs_bulkstat_ichunk_ra(
 {
        xfs_agblock_t                   agbno;
        struct blk_plug                 plug;
-       int                             blks_per_cluster;
-       int                             inodes_per_cluster;
        int                             i;      /* inode chunk index */
 
        agbno = XFS_AGINO_TO_AGBNO(mp, irec->ir_startino);
-       blks_per_cluster = xfs_icluster_size_fsb(mp);
-       inodes_per_cluster = blks_per_cluster << mp->m_sb.sb_inopblog;
 
        blk_start_plug(&plug);
        for (i = 0; i < XFS_INODES_PER_CHUNK;
-            i += inodes_per_cluster, agbno += blks_per_cluster) {
-               if (xfs_inobt_maskn(i, inodes_per_cluster) & ~irec->ir_free) {
-                       xfs_btree_reada_bufs(mp, agno, agbno, blks_per_cluster,
-                                            &xfs_inode_buf_ops);
+            i += mp->m_inodes_per_cluster, agbno += mp->m_blocks_per_cluster) {
+               if (xfs_inobt_maskn(i, mp->m_inodes_per_cluster) &
+                   ~irec->ir_free) {
+                       xfs_btree_reada_bufs(mp, agno, agbno,
+                                       mp->m_blocks_per_cluster,
+                                       &xfs_inode_buf_ops);
                }
        }
        blk_finish_plug(&plug);