]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xfs: calculate correct offset in xfs_scrub_quota_item
authorEric Sandeen <sandeen@redhat.com>
Tue, 28 Nov 2017 02:23:33 +0000 (18:23 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 28 Nov 2017 16:57:11 +0000 (08:57 -0800)
commit712d361d59efa6349a9538f4fd9a49073f0e8127
treeccf0021f560ed2c56c6d91b99f662c2792aa4445
parenteda6bc27ccc852d34393739009486932f3ba70ae
xfs: calculate correct offset in xfs_scrub_quota_item

It's only used for tracepoints so it's relatively harmless,
but the offset is calculated incorrectly in xfs_scrub_quota_item.

qi_dqperchunk is the nr. of dquots per "chunk" which we have
conveniently *cough* defined to always be 1 FSB.  Therefore
block_offset * qi_dqperchunk == first id in that chunk,
and so offset = id / qi_dqperchunk

id * dqperchunk is ... meaningless.

Fixes-coverity-id: 1423965
Fixes: c2fc338c ("xfs: scrub quota information")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/scrub/quota.c