]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Resync recent minor kernel changes
authorBarry Naujok <bnaujok@sgi.com>
Wed, 1 Oct 2008 06:25:17 +0000 (06:25 +0000)
committerBarry Naujok <bnaujok@sgi.com>
Wed, 1 Oct 2008 06:25:17 +0000 (06:25 +0000)
Merge of master-melb:xfs-cmds:32234a by kenmcd.

  Resync recent minor kernel changes

libxfs/xfs_alloc.c
libxfs/xfs_btree.c

index b47b632241ea6287bac8e009ed097c5548725d8f..ea828b0f3cc773e96ec82d6cfd306b7786d969d4 100644 (file)
@@ -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",
index bd84aa455f143babb2774c5f244be60ff14ba0e1..12bd1631889dedca01544b2d324df66d8c936fb9 100644 (file)
@@ -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.