xfs: make the record pointer passed to query_range functions const

The query_range functions are supposed to call a caller-supplied
function on each record found in the dataset.  These functions don't
own the memory storing the record, so don't let them change the record.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Darrick J. Wong
2021-08-10 17:02:16 -07:00
parent 04dcb47482
commit 159eb69dba
20 changed files with 63 additions and 59 deletions

View File

@@ -74,7 +74,7 @@ xfs_inobt_update(
void
xfs_inobt_btrec_to_irec(
struct xfs_mount *mp,
union xfs_btree_rec *rec,
const union xfs_btree_rec *rec,
struct xfs_inobt_rec_incore *irec)
{
irec->ir_startino = be32_to_cpu(rec->inobt.ir_startino);
@@ -2716,7 +2716,7 @@ struct xfs_ialloc_count_inodes {
STATIC int
xfs_ialloc_count_inodes_rec(
struct xfs_btree_cur *cur,
union xfs_btree_rec *rec,
const union xfs_btree_rec *rec,
void *priv)
{
struct xfs_inobt_rec_incore irec;