aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-10-20 15:46:18 +1100
committerSasha Levin <alexander.levin@verizon.com>2016-11-23 21:53:24 -0500
commitda512d38ffce476a7bebb4474ed572887cbb5fb1 (patch)
tree646cb73d01802ab73175d9efab147e757271a11e
parent6848fad2cbb5a1b86f1e39088ab1358a1ea81cfa (diff)
downloadlinux-linaro-stable-da512d38ffce476a7bebb4474ed572887cbb5fb1.tar.gz
libxfs: clean up _calc_dquots_per_chunk
[ Upstream commit 58d789678546d46d7bbd809dd7dab417c0f23655 ] 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: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r--fs/xfs/libxfs/xfs_dquot_buf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
index c6fba7314e8f..7c45d324880b 100644
--- a/fs/xfs/libxfs/xfs_dquot_buf.c
+++ b/fs/xfs/libxfs/xfs_dquot_buf.c
@@ -193,8 +193,7 @@ xfs_dquot_buf_verify_crc(
if (mp->m_quotainfo)
ndquots = mp->m_quotainfo->qi_dqperchunk;
else
- ndquots = xfs_calc_dquots_per_chunk(
- XFS_BB_TO_FSB(mp, bp->b_length));
+ ndquots = xfs_calc_dquots_per_chunk(bp->b_length);
for (i = 0; i < ndquots; i++, d++) {
if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),