From 55fdeb24c52e06e5fe29acf8f1a399603859a89b Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 28 Jun 2018 15:11:57 -0500 Subject: [PATCH] xfs: don't ASSERT on short form btree root pointer of zero Source kernel commit: 1f5c071d19aef379d0876929a598adcbc7f87986 Don't ASSERT if the short form btree root pointer is zero. Now that we use xfs_verify_agbno to check all short form btree pointers, we'll let that log the error and pass it to the upper layers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Eric Sandeen --- libxfs/xfs_alloc_btree.c | 1 - libxfs/xfs_refcount_btree.c | 1 - libxfs/xfs_rmap_btree.c | 1 - 3 files changed, 3 deletions(-) diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c index 5b81aec00..01c18d21c 100644 --- a/libxfs/xfs_alloc_btree.c +++ b/libxfs/xfs_alloc_btree.c @@ -240,7 +240,6 @@ xfs_allocbt_init_ptr_from_cur( struct xfs_agf *agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); ASSERT(cur->bc_private.a.agno == be32_to_cpu(agf->agf_seqno)); - ASSERT(agf->agf_roots[cur->bc_btnum] != 0); ptr->s = agf->agf_roots[cur->bc_btnum]; } diff --git a/libxfs/xfs_refcount_btree.c b/libxfs/xfs_refcount_btree.c index 167b1fd11..05eb9dc9b 100644 --- a/libxfs/xfs_refcount_btree.c +++ b/libxfs/xfs_refcount_btree.c @@ -191,7 +191,6 @@ xfs_refcountbt_init_ptr_from_cur( struct xfs_agf *agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); ASSERT(cur->bc_private.a.agno == be32_to_cpu(agf->agf_seqno)); - ASSERT(agf->agf_refcount_root != 0); ptr->s = agf->agf_refcount_root; } diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c index b30b9307e..b6c321c7c 100644 --- a/libxfs/xfs_rmap_btree.c +++ b/libxfs/xfs_rmap_btree.c @@ -232,7 +232,6 @@ xfs_rmapbt_init_ptr_from_cur( struct xfs_agf *agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); ASSERT(cur->bc_private.a.agno == be32_to_cpu(agf->agf_seqno)); - ASSERT(agf->agf_roots[cur->bc_btnum] != 0); ptr->s = agf->agf_roots[cur->bc_btnum]; } -- 2.47.2