diff options
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.c')
-rw-r--r-- | fs/xfs/xfs_dir2_leaf.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index 0f5e2f2ce6ec..b1cf1fbf423d 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c | |||
@@ -24,14 +24,12 @@ | |||
24 | #include "xfs_trans.h" | 24 | #include "xfs_trans.h" |
25 | #include "xfs_sb.h" | 25 | #include "xfs_sb.h" |
26 | #include "xfs_ag.h" | 26 | #include "xfs_ag.h" |
27 | #include "xfs_dir.h" | ||
28 | #include "xfs_dir2.h" | 27 | #include "xfs_dir2.h" |
29 | #include "xfs_dmapi.h" | 28 | #include "xfs_dmapi.h" |
30 | #include "xfs_mount.h" | 29 | #include "xfs_mount.h" |
31 | #include "xfs_da_btree.h" | 30 | #include "xfs_da_btree.h" |
32 | #include "xfs_bmap_btree.h" | 31 | #include "xfs_bmap_btree.h" |
33 | #include "xfs_attr_sf.h" | 32 | #include "xfs_attr_sf.h" |
34 | #include "xfs_dir_sf.h" | ||
35 | #include "xfs_dir2_sf.h" | 33 | #include "xfs_dir2_sf.h" |
36 | #include "xfs_dinode.h" | 34 | #include "xfs_dinode.h" |
37 | #include "xfs_inode.h" | 35 | #include "xfs_inode.h" |
@@ -407,7 +405,7 @@ xfs_dir2_leaf_addname( | |||
407 | * Initialize our new entry (at last). | 405 | * Initialize our new entry (at last). |
408 | */ | 406 | */ |
409 | dep = (xfs_dir2_data_entry_t *)dup; | 407 | dep = (xfs_dir2_data_entry_t *)dup; |
410 | INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); | 408 | dep->inumber = cpu_to_be64(args->inumber); |
411 | dep->namelen = args->namelen; | 409 | dep->namelen = args->namelen; |
412 | memcpy(dep->name, args->name, dep->namelen); | 410 | memcpy(dep->name, args->name, dep->namelen); |
413 | tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); | 411 | tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); |
@@ -884,7 +882,7 @@ xfs_dir2_leaf_getdents( | |||
884 | XFS_DIR2_BYTE_TO_DA(mp, | 882 | XFS_DIR2_BYTE_TO_DA(mp, |
885 | XFS_DIR2_LEAF_OFFSET) - map_off, | 883 | XFS_DIR2_LEAF_OFFSET) - map_off, |
886 | XFS_BMAPI_METADATA, NULL, 0, | 884 | XFS_BMAPI_METADATA, NULL, 0, |
887 | &map[map_valid], &nmap, NULL); | 885 | &map[map_valid], &nmap, NULL, NULL); |
888 | /* | 886 | /* |
889 | * Don't know if we should ignore this or | 887 | * Don't know if we should ignore this or |
890 | * try to return an error. | 888 | * try to return an error. |
@@ -1098,7 +1096,7 @@ xfs_dir2_leaf_getdents( | |||
1098 | 1096 | ||
1099 | p->cook = XFS_DIR2_BYTE_TO_DATAPTR(mp, curoff + length); | 1097 | p->cook = XFS_DIR2_BYTE_TO_DATAPTR(mp, curoff + length); |
1100 | 1098 | ||
1101 | p->ino = INT_GET(dep->inumber, ARCH_CONVERT); | 1099 | p->ino = be64_to_cpu(dep->inumber); |
1102 | #if XFS_BIG_INUMS | 1100 | #if XFS_BIG_INUMS |
1103 | p->ino += mp->m_inoadd; | 1101 | p->ino += mp->m_inoadd; |
1104 | #endif | 1102 | #endif |
@@ -1319,7 +1317,7 @@ xfs_dir2_leaf_lookup( | |||
1319 | /* | 1317 | /* |
1320 | * Return the found inode number. | 1318 | * Return the found inode number. |
1321 | */ | 1319 | */ |
1322 | args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); | 1320 | args->inumber = be64_to_cpu(dep->inumber); |
1323 | xfs_da_brelse(tp, dbp); | 1321 | xfs_da_brelse(tp, dbp); |
1324 | xfs_da_brelse(tp, lbp); | 1322 | xfs_da_brelse(tp, lbp); |
1325 | return XFS_ERROR(EEXIST); | 1323 | return XFS_ERROR(EEXIST); |
@@ -1606,11 +1604,11 @@ xfs_dir2_leaf_replace( | |||
1606 | dep = (xfs_dir2_data_entry_t *) | 1604 | dep = (xfs_dir2_data_entry_t *) |
1607 | ((char *)dbp->data + | 1605 | ((char *)dbp->data + |
1608 | XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, be32_to_cpu(lep->address))); | 1606 | XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, be32_to_cpu(lep->address))); |
1609 | ASSERT(args->inumber != INT_GET(dep->inumber, ARCH_CONVERT)); | 1607 | ASSERT(args->inumber != be64_to_cpu(dep->inumber)); |
1610 | /* | 1608 | /* |
1611 | * Put the new inode number in, log it. | 1609 | * Put the new inode number in, log it. |
1612 | */ | 1610 | */ |
1613 | INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); | 1611 | dep->inumber = cpu_to_be64(args->inumber); |
1614 | tp = args->trans; | 1612 | tp = args->trans; |
1615 | xfs_dir2_data_log_entry(tp, dbp, dep); | 1613 | xfs_dir2_data_log_entry(tp, dbp, dep); |
1616 | xfs_da_buf_done(dbp); | 1614 | xfs_da_buf_done(dbp); |