summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2003-05-03 01:41:07 +0200
committerNathan Scott <nathans@sgi.com>2003-05-03 01:41:07 +0200
commit092488f7e38ec9d786a9ba7fa4e6624c39d705c0 (patch)
treefaf747f7db73c586d4bdf8c54be8b88005a2bb76
parenta22762afda91f18716a7958a15a1ed30369ed300 (diff)
[XFS] Add a validity check for unwritten extents, trying to trap a problem
on ia64. SGI Modid: 2.5.x-xfs:slinx:144727a
-rw-r--r--fs/xfs/linux/xfs_aops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/linux/xfs_aops.c b/fs/xfs/linux/xfs_aops.c
index 0ee7b404a2ca..7e9ecd1cbd2e 100644
--- a/fs/xfs/linux/xfs_aops.c
+++ b/fs/xfs/linux/xfs_aops.c
@@ -398,6 +398,12 @@ map_unwritten(
nblocks++;
} while ((bh = bh->b_this_page) != head);
+ if (unlikely(nblocks == 0)) {
+ printk("XFS: bad unwritten extent map: bh=0x%p, mp=0x%p\n",
+ curr, mp);
+ BUG();
+ }
+
atomic_add(nblocks, &pb->pb_io_remaining);
/* If we reached the end of the page, map forwards in any