]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: simplify xfs_calc_dquots_per_chunk
authorEric Sandeen <sandeen@redhat.com>
Thu, 11 May 2017 19:01:07 +0000 (14:01 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 11 May 2017 19:01:07 +0000 (14:01 -0500)
commit2db39f3d92737847ccdaf9ebd7a030e9426fa8a8
treef06fdacaa65910bfb3806c12bcc57ec1a06bf2f6
parent9282c506a62cad473c4c5f157f3eff0b0b9c3f10
xfs: simplify xfs_calc_dquots_per_chunk

Source kernel commit: d956f813b6e731ef82699a18e468e37d59a1366d

ndquots is a 32-bit value, and we don't care
about the remainder; there is no reason to use do_div
here, it seems to be the result of a decade+ historical
accident.

Worse, the do_div implementation in userspace breaks
when fed a 32-bit dividend, so we commented it out there
in any case.

Change to simple division, and then we can change
userspace to match, and mandate a 64-bit dividend in
the do_div() in userspace as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dquot_buf.c