]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
libxfs: clean up _calc_dquots_per_chunk
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 20 Oct 2016 04:46:18 +0000 (15:46 +1100)
committerJiri Slaby <jslaby@suse.cz>
Tue, 22 Nov 2016 19:43:38 +0000 (20:43 +0100)
commit 58d789678546d46d7bbd809dd7dab417c0f23655 upstream.

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.

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: Jiri Slaby <jslaby@suse.cz>
fs/xfs/xfs_dquot.c

index 895db7a884125433f4d8fd7d321758224f1738f6..65d600f0d200e72e638525b928ecfe5a012c5ba8 100644 (file)
@@ -312,8 +312,7 @@ xfs_dquot_buf_verify_crc(
        if (mp->m_quotainfo)
                ndquots = mp->m_quotainfo->qi_dqperchunk;
        else
-               ndquots = xfs_qm_calc_dquots_per_chunk(mp,
-                                       XFS_BB_TO_FSB(mp, bp->b_length));
+               ndquots = xfs_qm_calc_dquots_per_chunk(mp, bp->b_length);
 
        for (i = 0; i < ndquots; i++, d++) {
                if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),