summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-08-10 17:02:15 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-08-18 18:46:00 -0700
commitd29d5577774d7d032da1343dba80be7423e307f9 (patch)
tree3b520ace9e1f71ae3899b934909d60a429f2a2f8 /fs/xfs/libxfs/xfs_btree.h
parent7f89c838396e2e5b484dd59cdd59eb990a79fd9a (diff)
downloadlinux-d29d5577774d7d032da1343dba80be7423e307f9.tar.gz
linux-d29d5577774d7d032da1343dba80be7423e307f9.tar.bz2
linux-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 <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
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;