summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-08-12 18:49:03 +0200
committerDarrick J. Wong <djwong@kernel.org>2021-08-19 03:46:02 +0200
commitb5a6e5fe0e6840bc90e51cf522d6c5a880cde567 (patch)
treeb63a15a09a298f308a0bd85d2737dc11b4a1f44f /fs/xfs/libxfs/xfs_btree.h
parentxfs: mark the record passed into xchk_btree functions as const (diff)
downloadlinux-b5a6e5fe0e6840bc90e51cf522d6c5a880cde567.tar.xz
linux-b5a6e5fe0e6840bc90e51cf522d6c5a880cde567.zip
xfs: make the pointer passed to btree set_root functions const
The pointer passed to each per-AG btree type's ->set_root function isn't supposed to be modified (that function sets an external pointer to the root block) so mark them const. 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
index 4b95373c6d23..504032d91a0a 100644
--- a/fs/xfs/libxfs/xfs_btree.h
+++ b/fs/xfs/libxfs/xfs_btree.h
@@ -106,7 +106,7 @@ struct xfs_btree_ops {
/* update btree root pointer */
void (*set_root)(struct xfs_btree_cur *cur,
- union xfs_btree_ptr *nptr, int level_change);
+ const union xfs_btree_ptr *nptr, int level_change);
/* block allocation / freeing */
int (*alloc_block)(struct xfs_btree_cur *cur,