xfs: make the key parameters to all btree query range functions const

Range query functions are not supposed to modify the query keys that are
being passed in, so mark them all const.

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:15 -07:00
parent d29d557777
commit 04dcb47482
6 changed files with 16 additions and 14 deletions

View file

@ -3407,8 +3407,8 @@ xfs_alloc_query_range_helper(
int
xfs_alloc_query_range(
struct xfs_btree_cur *cur,
struct xfs_alloc_rec_incore *low_rec,
struct xfs_alloc_rec_incore *high_rec,
const struct xfs_alloc_rec_incore *low_rec,
const struct xfs_alloc_rec_incore *high_rec,
xfs_alloc_query_range_fn fn,
void *priv)
{

View file

@ -225,8 +225,8 @@ typedef int (*xfs_alloc_query_range_fn)(
void *priv);
int xfs_alloc_query_range(struct xfs_btree_cur *cur,
struct xfs_alloc_rec_incore *low_rec,
struct xfs_alloc_rec_incore *high_rec,
const struct xfs_alloc_rec_incore *low_rec,
const struct xfs_alloc_rec_incore *high_rec,
xfs_alloc_query_range_fn fn, void *priv);
int xfs_alloc_query_all(struct xfs_btree_cur *cur, xfs_alloc_query_range_fn fn,
void *priv);

View file

@ -4536,8 +4536,8 @@ xfs_btree_compute_maxlevels(
STATIC int
xfs_btree_simple_query_range(
struct xfs_btree_cur *cur,
union xfs_btree_key *low_key,
union xfs_btree_key *high_key,
const union xfs_btree_key *low_key,
const union xfs_btree_key *high_key,
xfs_btree_query_range_fn fn,
void *priv)
{
@ -4627,8 +4627,8 @@ xfs_btree_simple_query_range(
STATIC int
xfs_btree_overlapped_query_range(
struct xfs_btree_cur *cur,
union xfs_btree_key *low_key,
union xfs_btree_key *high_key,
const union xfs_btree_key *low_key,
const union xfs_btree_key *high_key,
xfs_btree_query_range_fn fn,
void *priv)
{
@ -4769,8 +4769,8 @@ xfs_btree_overlapped_query_range(
int
xfs_btree_query_range(
struct xfs_btree_cur *cur,
union xfs_btree_irec *low_rec,
union xfs_btree_irec *high_rec,
const union xfs_btree_irec *low_rec,
const union xfs_btree_irec *high_rec,
xfs_btree_query_range_fn fn,
void *priv)
{

View file

@ -474,7 +474,8 @@ typedef int (*xfs_btree_query_range_fn)(struct xfs_btree_cur *cur,
union xfs_btree_rec *rec, void *priv);
int xfs_btree_query_range(struct xfs_btree_cur *cur,
union xfs_btree_irec *low_rec, union xfs_btree_irec *high_rec,
const union xfs_btree_irec *low_rec,
const union xfs_btree_irec *high_rec,
xfs_btree_query_range_fn fn, void *priv);
int xfs_btree_query_all(struct xfs_btree_cur *cur, xfs_btree_query_range_fn fn,
void *priv);

View file

@ -2296,8 +2296,8 @@ xfs_rmap_query_range_helper(
int
xfs_rmap_query_range(
struct xfs_btree_cur *cur,
struct xfs_rmap_irec *low_rec,
struct xfs_rmap_irec *high_rec,
const struct xfs_rmap_irec *low_rec,
const struct xfs_rmap_irec *high_rec,
xfs_rmap_query_range_fn fn,
void *priv)
{

View file

@ -139,7 +139,8 @@ typedef int (*xfs_rmap_query_range_fn)(
void *priv);
int xfs_rmap_query_range(struct xfs_btree_cur *cur,
struct xfs_rmap_irec *low_rec, struct xfs_rmap_irec *high_rec,
const struct xfs_rmap_irec *low_rec,
const struct xfs_rmap_irec *high_rec,
xfs_rmap_query_range_fn fn, void *priv);
int xfs_rmap_query_all(struct xfs_btree_cur *cur, xfs_rmap_query_range_fn fn,
void *priv);