Commit 9c5e89d5 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Sasha Levin

libxfs: clean up _calc_dquots_per_chunk

[ Upstream commit 58d78967 ]

The function xfs_calc_dquots_per_chunk takes a parameter in units
of basic blocks.  The kernel seems to get the units wrong, but
userspace got 'fixed' by commenting out the unnecessary conversion.
Fix both.

cc: <stable@vger.kernel.org>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent d1375c3e
...@@ -191,8 +191,7 @@ xfs_dquot_buf_verify_crc( ...@@ -191,8 +191,7 @@ xfs_dquot_buf_verify_crc(
if (mp->m_quotainfo) if (mp->m_quotainfo)
ndquots = mp->m_quotainfo->qi_dqperchunk; ndquots = mp->m_quotainfo->qi_dqperchunk;
else else
ndquots = xfs_calc_dquots_per_chunk( ndquots = xfs_calc_dquots_per_chunk(bp->b_length);
XFS_BB_TO_FSB(mp, bp->b_length));
for (i = 0; i < ndquots; i++, d++) { for (i = 0; i < ndquots; i++, d++) {
if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk), if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),
......
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