aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index ef8c31a14c92..cebcfcc06a93 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -634,10 +634,8 @@ xfs_iformat_extents(
634 xfs_validate_extents(ifp, nex, XFS_EXTFMT_INODE(ip)); 634 xfs_validate_extents(ifp, nex, XFS_EXTFMT_INODE(ip));
635 for (i = 0; i < nex; i++, dp++) { 635 for (i = 0; i < nex; i++, dp++) {
636 xfs_bmbt_rec_host_t *ep = xfs_iext_get_ext(ifp, i); 636 xfs_bmbt_rec_host_t *ep = xfs_iext_get_ext(ifp, i);
637 ep->l0 = INT_GET(get_unaligned((__uint64_t*)&dp->l0), 637 ep->l0 = be64_to_cpu(get_unaligned(&dp->l0));
638 ARCH_CONVERT); 638 ep->l1 = be64_to_cpu(get_unaligned(&dp->l1));
639 ep->l1 = INT_GET(get_unaligned((__uint64_t*)&dp->l1),
640 ARCH_CONVERT);
641 } 639 }
642 XFS_BMAP_TRACE_EXLIST(ip, nex, whichfork); 640 XFS_BMAP_TRACE_EXLIST(ip, nex, whichfork);
643 if (whichfork != XFS_DATA_FORK || 641 if (whichfork != XFS_DATA_FORK ||
@@ -2916,10 +2914,8 @@ xfs_iextents_copy(
2916 } 2914 }
2917 2915
2918 /* Translate to on disk format */ 2916 /* Translate to on disk format */
2919 put_unaligned(INT_GET(ep->l0, ARCH_CONVERT), 2917 put_unaligned(cpu_to_be64(ep->l0), &dp->l0);
2920 (__uint64_t*)&dp->l0); 2918 put_unaligned(cpu_to_be64(ep->l1), &dp->l1);
2921 put_unaligned(INT_GET(ep->l1, ARCH_CONVERT),
2922 (__uint64_t*)&dp->l1);
2923 dp++; 2919 dp++;
2924 copied++; 2920 copied++;
2925 } 2921 }