diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-08-11 03:02:16 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-19 04:46:01 +0300 |
commit | 23825cd148764ce133ee92375da395140d6ccb15 (patch) | |
tree | d73f953ad61604ee739a6725346b9cb21a7e1a88 /fs/xfs/libxfs/xfs_rmap_btree.c | |
parent | 159eb69dba8baf6d5b58b69936920fb311324c82 (diff) | |
download | linux-23825cd148764ce133ee92375da395140d6ccb15.tar.xz |
xfs: mark the record passed into btree init_key functions as const
These functions initialize a key from a record, but they aren't supposed
to modify the record. Mark it const.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_rmap_btree.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap_btree.c b/fs/xfs/libxfs/xfs_rmap_btree.c index f6571c06ce04..df57b40d001f 100644 --- a/fs/xfs/libxfs/xfs_rmap_btree.c +++ b/fs/xfs/libxfs/xfs_rmap_btree.c @@ -156,8 +156,8 @@ xfs_rmapbt_get_maxrecs( STATIC void xfs_rmapbt_init_key_from_rec( - union xfs_btree_key *key, - union xfs_btree_rec *rec) + union xfs_btree_key *key, + const union xfs_btree_rec *rec) { key->rmap.rm_startblock = rec->rmap.rm_startblock; key->rmap.rm_owner = rec->rmap.rm_owner; @@ -173,11 +173,11 @@ xfs_rmapbt_init_key_from_rec( */ STATIC void xfs_rmapbt_init_high_key_from_rec( - union xfs_btree_key *key, - union xfs_btree_rec *rec) + union xfs_btree_key *key, + const union xfs_btree_rec *rec) { - uint64_t off; - int adj; + uint64_t off; + int adj; adj = be32_to_cpu(rec->rmap.rm_blockcount) - 1; |