aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_bmap_btree.c')
-rw-r--r--fs/xfs/xfs_bmap_btree.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index 853828c6b45e..11137c042c94 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -44,7 +44,6 @@
44#include "xfs_error.h" 44#include "xfs_error.h"
45#include "xfs_quota.h" 45#include "xfs_quota.h"
46 46
47
48/* 47/*
49 * Determine the extent state. 48 * Determine the extent state.
50 */ 49 */
@@ -85,9 +84,9 @@ xfs_bmdr_to_bmbt(
85 rblock->bb_leftsib = cpu_to_be64(NULLDFSBNO); 84 rblock->bb_leftsib = cpu_to_be64(NULLDFSBNO);
86 rblock->bb_rightsib = cpu_to_be64(NULLDFSBNO); 85 rblock->bb_rightsib = cpu_to_be64(NULLDFSBNO);
87 dmxr = xfs_bmdr_maxrecs(mp, dblocklen, 0); 86 dmxr = xfs_bmdr_maxrecs(mp, dblocklen, 0);
88 fkp = XFS_BTREE_KEY_ADDR(xfs_bmdr, dblock, 1); 87 fkp = XFS_BMDR_KEY_ADDR(dblock, 1);
89 tkp = XFS_BMAP_BROOT_KEY_ADDR(rblock, 1, rblocklen); 88 tkp = XFS_BMBT_KEY_ADDR(mp, rblock, 1);
90 fpp = XFS_BTREE_PTR_ADDR(xfs_bmdr, dblock, 1, dmxr); 89 fpp = XFS_BMDR_PTR_ADDR(dblock, 1, dmxr);
91 tpp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, rblocklen); 90 tpp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, rblocklen);
92 dmxr = be16_to_cpu(dblock->bb_numrecs); 91 dmxr = be16_to_cpu(dblock->bb_numrecs);
93 memcpy(tkp, fkp, sizeof(*fkp) * dmxr); 92 memcpy(tkp, fkp, sizeof(*fkp) * dmxr);
@@ -448,10 +447,10 @@ xfs_bmbt_to_bmdr(
448 dblock->bb_level = rblock->bb_level; 447 dblock->bb_level = rblock->bb_level;
449 dblock->bb_numrecs = rblock->bb_numrecs; 448 dblock->bb_numrecs = rblock->bb_numrecs;
450 dmxr = xfs_bmdr_maxrecs(mp, dblocklen, 0); 449 dmxr = xfs_bmdr_maxrecs(mp, dblocklen, 0);
451 fkp = XFS_BMAP_BROOT_KEY_ADDR(rblock, 1, rblocklen); 450 fkp = XFS_BMBT_KEY_ADDR(mp, rblock, 1);
452 tkp = XFS_BTREE_KEY_ADDR(xfs_bmdr, dblock, 1); 451 tkp = XFS_BMDR_KEY_ADDR(dblock, 1);
453 fpp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, rblocklen); 452 fpp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, rblocklen);
454 tpp = XFS_BTREE_PTR_ADDR(xfs_bmdr, dblock, 1, dmxr); 453 tpp = XFS_BMDR_PTR_ADDR(dblock, 1, dmxr);
455 dmxr = be16_to_cpu(dblock->bb_numrecs); 454 dmxr = be16_to_cpu(dblock->bb_numrecs);
456 memcpy(tkp, fkp, sizeof(*fkp) * dmxr); 455 memcpy(tkp, fkp, sizeof(*fkp) * dmxr);
457 memcpy(tpp, fpp, sizeof(*fpp) * dmxr); 456 memcpy(tpp, fpp, sizeof(*fpp) * dmxr);