aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <[email protected]>2021-08-11 00:02:15 +0000
committerDarrick J. Wong <[email protected]>2021-08-19 01:46:00 +0000
commitd29d5577774d7d032da1343dba80be7423e307f9 (patch)
tree3b520ace9e1f71ae3899b934909d60a429f2a2f8 /fs/xfs/libxfs/xfs_btree.h
parentxfs: add trace point for fs shutdown (diff)
downloadkernel-d29d5577774d7d032da1343dba80be7423e307f9.tar.gz
kernel-d29d5577774d7d032da1343dba80be7423e307f9.zip
xfs: make the key parameters to all btree key comparison functions const
The btree key comparison functions are not allowed to change the keys that are passed in, so mark them const. We'll need this for the next patch, which adds const to the btree range query functions. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_btree.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
index 4dbdc659c396..7154ad8647c9 100644
--- a/fs/xfs/libxfs/xfs_btree.h
+++ b/fs/xfs/libxfs/xfs_btree.h
@@ -140,15 +140,15 @@ struct xfs_btree_ops {
/* difference between key value and cursor value */
int64_t (*key_diff)(struct xfs_btree_cur *cur,
- union xfs_btree_key *key);
+ const union xfs_btree_key *key);
/*
* Difference between key2 and key1 -- positive if key1 > key2,
* negative if key1 < key2, and zero if equal.
*/
int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
- union xfs_btree_key *key1,
- union xfs_btree_key *key2);
+ const union xfs_btree_key *key1,
+ const union xfs_btree_key *key2);
const struct xfs_buf_ops *buf_ops;