Commit 369f07b8 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix incorrect use of do_div on realtime device growfs code path.

SGI Modid: xfs-linux:xfs-kern:178670a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 0eaf89f2
...@@ -1966,7 +1966,8 @@ xfs_growfs_rt( ...@@ -1966,7 +1966,8 @@ xfs_growfs_rt(
/* /*
* Calculate new parameters. These are the final values to be reached. * 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); nrbmblocks = roundup_64(nrextents, NBBY * sbp->sb_blocksize);
nrextslog = xfs_highbit32(nrextents); nrextslog = xfs_highbit32(nrextents);
nrsumlevels = nrextslog + 1; nrsumlevels = nrextslog + 1;
...@@ -2021,7 +2022,8 @@ xfs_growfs_rt( ...@@ -2021,7 +2022,8 @@ xfs_growfs_rt(
XFS_RTMIN(nrblocks, XFS_RTMIN(nrblocks,
nsbp->sb_rbmblocks * NBBY * nsbp->sb_rbmblocks * NBBY *
nsbp->sb_blocksize * nsbp->sb_rextsize); 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); nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents);
nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1; nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1;
nrsumsize = nrsumsize =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment