]> git.hungrycats.org Git - linux/commitdiff
[XFS] Fix incorrect use of do_div on realtime device growfs code path.
authorNathan Scott <nathans@sgi.com>
Tue, 28 Sep 2004 23:25:04 +0000 (09:25 +1000)
committerNathan Scott <nathans@sgi.com>
Tue, 28 Sep 2004 23:25:04 +0000 (09:25 +1000)
SGI Modid: xfs-linux:xfs-kern:178670a
Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/xfs_rtalloc.c

index acc87d134dd1489a79ec914c7b5e100f36c31bad..431c8f4506c37148f5989841c45166f5cc1f9104 100644 (file)
@@ -1966,7 +1966,8 @@ xfs_growfs_rt(
        /*
         * Calculate new parameters.  These are the final values to be reached.
         */
-       nrextents = do_div(nrblocks, in->extsize);
+       nrextents = nrblocks;
+       do_div(nrextents, in->extsize);
        nrbmblocks = roundup_64(nrextents, NBBY * sbp->sb_blocksize);
        nrextslog = xfs_highbit32(nrextents);
        nrsumlevels = nrextslog + 1;
@@ -2021,7 +2022,8 @@ xfs_growfs_rt(
                        XFS_RTMIN(nrblocks,
                                  nsbp->sb_rbmblocks * NBBY *
                                  nsbp->sb_blocksize * nsbp->sb_rextsize);
-               nsbp->sb_rextents = do_div(nsbp->sb_rblocks, nsbp->sb_rextsize);
+               nsbp->sb_rextents = nsbp->sb_rblocks;
+               do_div(nsbp->sb_rextents, nsbp->sb_rextsize);
                nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents);
                nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1;
                nrsumsize =