aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_alloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-08-10 17:02:16 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-08-18 18:46:01 -0700
commit159eb69dba8baf6d5b58b69936920fb311324c82 (patch)
tree7bbd1f5e499826fe8bef7734be85a56572907b59 /fs/xfs/libxfs/xfs_alloc.c
parentxfs: make the key parameters to all btree query range functions const (diff)
downloadlinux-dev-159eb69dba8baf6d5b58b69936920fb311324c82.tar.xz
linux-dev-159eb69dba8baf6d5b58b69936920fb311324c82.zip
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index d5ee19ae02eb..8cc6c1671901 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -3392,7 +3392,7 @@ struct xfs_alloc_query_range_info {
STATIC int
xfs_alloc_query_range_helper(
struct xfs_btree_cur *cur,
- union xfs_btree_rec *rec,
+ const union xfs_btree_rec *rec,
void *priv)
{
struct xfs_alloc_query_range_info *query = priv;