Commit b5a6e5fe authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

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: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 22ece4e8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ xfs_allocbt_dup_cursor(
STATIC void
xfs_allocbt_set_root(
	struct xfs_btree_cur		*cur,
	union xfs_btree_ptr	*ptr,
	const union xfs_btree_ptr	*ptr,
	int				inc)
{
	struct xfs_buf		*agbp = cur->bc_ag.agbp;
+1 −1
Original line number Diff line number Diff line
@@ -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,
+3 −3
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ xfs_btree_fakeroot_init_ptr_from_cur(
STATIC void
xfs_btree_afakeroot_set_root(
	struct xfs_btree_cur		*cur,
	union xfs_btree_ptr	*ptr,
	const union xfs_btree_ptr	*ptr,
	int				inc)
{
	struct xbtree_afakeroot	*afake = cur->bc_ag.afake;
+6 −6
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ xfs_inobt_dup_cursor(
STATIC void
xfs_inobt_set_root(
	struct xfs_btree_cur		*cur,
	union xfs_btree_ptr	*nptr,
	const union xfs_btree_ptr	*nptr,
	int				inc)	/* level change */
{
	struct xfs_buf		*agbp = cur->bc_ag.agbp;
@@ -55,7 +55,7 @@ xfs_inobt_set_root(
STATIC void
xfs_finobt_set_root(
	struct xfs_btree_cur		*cur,
	union xfs_btree_ptr	*nptr,
	const union xfs_btree_ptr	*nptr,
	int				inc)	/* level change */
{
	struct xfs_buf		*agbp = cur->bc_ag.agbp;
+3 −3
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ xfs_refcountbt_dup_cursor(
STATIC void
xfs_refcountbt_set_root(
	struct xfs_btree_cur		*cur,
	union xfs_btree_ptr	*ptr,
	const union xfs_btree_ptr	*ptr,
	int				inc)
{
	struct xfs_buf		*agbp = cur->bc_ag.agbp;
Loading