summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-11-03 10:34:42 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2017-11-06 11:53:39 -0800
commitf36bc228e1b94d9994915cba67588104ebe763ae (patch)
tree67181994d0555b9c1a47fd1f6ae49fe08120c43f /fs/xfs/libxfs/xfs_bmap.c
parent42630361003461edd7607c1d459ab9d66ef97813 (diff)
downloadtalos-obmc-linux-f36bc228e1b94d9994915cba67588104ebe763ae.tar.gz
talos-obmc-linux-f36bc228e1b94d9994915cba67588104ebe763ae.zip
xfs: pass an on-disk extent to xfs_bmbt_validate_extent
This prepares for getting rid of the current in-memory extent format. At the end of the series we will change the calling convention again to pass the xfs_bmbt_irec structure once it is available everywhere. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 62270b871d06..8ce7bf19916f 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1260,14 +1260,14 @@ xfs_iread_extents(
frp = XFS_BMBT_REC_ADDR(mp, block, 1);
for (j = 0; j < num_recs; j++, i++, frp++) {
xfs_bmbt_rec_host_t *trp = xfs_iext_get_ext(ifp, i);
- trp->l0 = be64_to_cpu(frp->l0);
- trp->l1 = be64_to_cpu(frp->l1);
- if (!xfs_bmbt_validate_extent(mp, whichfork, trp)) {
+ if (!xfs_bmbt_validate_extent(mp, whichfork, frp)) {
XFS_ERROR_REPORT("xfs_bmap_read_extents(2)",
XFS_ERRLEVEL_LOW, mp);
error = -EFSCORRUPTED;
goto out_brelse;
}
+ trp->l0 = be64_to_cpu(frp->l0);
+ trp->l1 = be64_to_cpu(frp->l1);
trace_xfs_read_extent(ip, i, state, _THIS_IP_);
}
xfs_trans_brelse(tp, bp);
OpenPOWER on IntegriCloud