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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user