aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-06-05 02:24:15 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-07-14 01:29:37 -0400
commit4e5ae8386b55677bde05bbd38b8fc82c67ad4564 (patch)
treeeb28b9003453d55c21b81da63ce1fb4a897023ed
parent210c6f1caa451623e14a7cd71000d2c2e0d9cc43 (diff)
[XFS] xfs_bmapi fails to update the previous extent pointer
When processing multiple extent maps, xfs_bmapi needs to keep track of the extent behind the one it is currently working on to be able to trim extent ranges correctly. Failing to update the previous pointer can result in corrupted extent lists in memory and this will result in panics or assert failures. Update the previous pointer correctly when we move to the next extent to process. SGI-PV: 965631 SGI-Modid: xfs-linux-melb:xfs-kern:28773a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Vlad Apostolov <vapo@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
-rw-r--r--fs/xfs/xfs_bmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index b1ea26e40aaf..9a654faf0c08 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -5219,10 +5219,10 @@ xfs_bmapi(
5219 * Else go on to the next record. 5219 * Else go on to the next record.
5220 */ 5220 */
5221 ep = xfs_iext_get_ext(ifp, ++lastx); 5221 ep = xfs_iext_get_ext(ifp, ++lastx);
5222 if (lastx >= nextents) { 5222 prev = got;
5223 if (lastx >= nextents)
5223 eof = 1; 5224 eof = 1;
5224 prev = got; 5225 else
5225 } else
5226 xfs_bmbt_get_all(ep, &got); 5226 xfs_bmbt_get_all(ep, &got);
5227 } 5227 }
5228 ifp->if_lastex = lastx; 5228 ifp->if_lastex = lastx;