- 2.6.17 port work build breaks, but the patch set is relativly stable
[linux-flexiantxendom0-3.2.10.git] / fs / xfs / xfs_bmap_btree.c
index 3f1383d..bea4470 100644 (file)
@@ -2754,7 +2754,7 @@ xfs_bmbt_update(
 }
 
 /*
- * Check an extent list, which has just been read, for
+ * Check extent records, which have just been read, for
  * any bit in the extent flag field. ASSERT on debug
  * kernels, as this condition should not occur.
  * Return an error condition (1) if any flags found,
@@ -2763,10 +2763,14 @@ xfs_bmbt_update(
 
 int
 xfs_check_nostate_extents(
-       xfs_bmbt_rec_t          *ep,
+       xfs_ifork_t             *ifp,
+       xfs_extnum_t            idx,
        xfs_extnum_t            num)
 {
-       for (; num > 0; num--, ep++) {
+       xfs_bmbt_rec_t          *ep;
+
+       for (; num > 0; num--, idx++) {
+               ep = xfs_iext_get_ext(ifp, idx);
                if ((ep->l0 >>
                     (64 - BMBT_EXNTFLAG_BITLEN)) != 0) {
                        ASSERT(0);