From: Barry Naujok Date: Wed, 1 Oct 2008 06:25:17 +0000 (+0000) Subject: Resync recent minor kernel changes X-Git-Tag: v3.0.0~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=870d4cbc2ee22f33162c04b4933a30a2e568fe35;p=thirdparty%2Fxfsprogs-dev.git Resync recent minor kernel changes Merge of master-melb:xfs-cmds:32234a by kenmcd. Resync recent minor kernel changes --- diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index b47b63224..ea828b0f3 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -2100,10 +2100,12 @@ xfs_alloc_read_agf( be32_to_cpu(agf->agf_magicnum) == XFS_AGF_MAGIC && XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) && be32_to_cpu(agf->agf_freeblks) <= be32_to_cpu(agf->agf_length) && - be32_to_cpu(agf->agf_btreeblks) <= be32_to_cpu(agf->agf_length) && be32_to_cpu(agf->agf_flfirst) < XFS_AGFL_SIZE(mp) && be32_to_cpu(agf->agf_fllast) < XFS_AGFL_SIZE(mp) && be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp); + if (xfs_sb_version_haslazysbcount(&mp->m_sb)) + agf_ok = agf_ok && be32_to_cpu(agf->agf_btreeblks) <= + be32_to_cpu(agf->agf_length); if (unlikely(XFS_TEST_ERROR(!agf_ok, mp, XFS_ERRTAG_ALLOC_READ_AGF, XFS_RANDOM_ALLOC_READ_AGF))) { XFS_CORRUPTION_ERROR("xfs_alloc_read_agf", diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c index bd84aa455..12bd16318 100644 --- a/libxfs/xfs_btree.c +++ b/libxfs/xfs_btree.c @@ -138,6 +138,7 @@ xfs_btree_check_lptr( return 0; } +#ifdef DEBUG /* * Check that (short) pointer is ok. */ @@ -175,6 +176,7 @@ xfs_btree_check_ptr( be32_to_cpu((&ptr->s)[index]), level); } } +#endif /* * Delete the btree cursor.