aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_block.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-06-09 00:48:37 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 00:48:37 -0400
commitff9901c1e7c7be06a99c59cfc3133d2316cbc957 (patch)
treed9cae983cf713d07ff65566e56beca52c21412d1 /fs/xfs/xfs_dir2_block.c
parent3e57ecf640428c01ba1ed8c8fc538447ada1715b (diff)
[XFS] endianess annotations for xfs_dir2_data_entry_t
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25806a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_block.c')
-rw-r--r--fs/xfs/xfs_dir2_block.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c
index 972ded595476..2621ff521dbd 100644
--- a/fs/xfs/xfs_dir2_block.c
+++ b/fs/xfs/xfs_dir2_block.c
@@ -400,7 +400,7 @@ xfs_dir2_block_addname(
400 /* 400 /*
401 * Create the new data entry. 401 * Create the new data entry.
402 */ 402 */
403 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); 403 dep->inumber = cpu_to_be64(args->inumber);
404 dep->namelen = args->namelen; 404 dep->namelen = args->namelen;
405 memcpy(dep->name, args->name, args->namelen); 405 memcpy(dep->name, args->name, args->namelen);
406 tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); 406 tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
@@ -508,7 +508,7 @@ xfs_dir2_block_getdents(
508 508
509 p.cook = XFS_DIR2_DB_OFF_TO_DATAPTR(mp, mp->m_dirdatablk, 509 p.cook = XFS_DIR2_DB_OFF_TO_DATAPTR(mp, mp->m_dirdatablk,
510 ptr - (char *)block); 510 ptr - (char *)block);
511 p.ino = INT_GET(dep->inumber, ARCH_CONVERT); 511 p.ino = be64_to_cpu(dep->inumber);
512#if XFS_BIG_INUMS 512#if XFS_BIG_INUMS
513 p.ino += mp->m_inoadd; 513 p.ino += mp->m_inoadd;
514#endif 514#endif
@@ -626,7 +626,7 @@ xfs_dir2_block_lookup(
626 /* 626 /*
627 * Fill in inode number, release the block. 627 * Fill in inode number, release the block.
628 */ 628 */
629 args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); 629 args->inumber = be64_to_cpu(dep->inumber);
630 xfs_da_brelse(args->trans, bp); 630 xfs_da_brelse(args->trans, bp);
631 return XFS_ERROR(EEXIST); 631 return XFS_ERROR(EEXIST);
632} 632}
@@ -844,11 +844,11 @@ xfs_dir2_block_replace(
844 */ 844 */
845 dep = (xfs_dir2_data_entry_t *) 845 dep = (xfs_dir2_data_entry_t *)
846 ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(blp[ent].address))); 846 ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(blp[ent].address)));
847 ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) != args->inumber); 847 ASSERT(be64_to_cpu(dep->inumber) != args->inumber);
848 /* 848 /*
849 * Change the inode number to the new value. 849 * Change the inode number to the new value.
850 */ 850 */
851 INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); 851 dep->inumber = cpu_to_be64(args->inumber);
852 xfs_dir2_data_log_entry(args->trans, bp, dep); 852 xfs_dir2_data_log_entry(args->trans, bp, dep);
853 xfs_dir2_data_check(dp, bp); 853 xfs_dir2_data_check(dp, bp);
854 xfs_da_buf_done(bp); 854 xfs_da_buf_done(bp);
@@ -1130,7 +1130,7 @@ xfs_dir2_sf_to_block(
1130 */ 1130 */
1131 dep = (xfs_dir2_data_entry_t *) 1131 dep = (xfs_dir2_data_entry_t *)
1132 ((char *)block + XFS_DIR2_DATA_DOT_OFFSET); 1132 ((char *)block + XFS_DIR2_DATA_DOT_OFFSET);
1133 INT_SET(dep->inumber, ARCH_CONVERT, dp->i_ino); 1133 dep->inumber = cpu_to_be64(dp->i_ino);
1134 dep->namelen = 1; 1134 dep->namelen = 1;
1135 dep->name[0] = '.'; 1135 dep->name[0] = '.';
1136 tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); 1136 tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
@@ -1144,7 +1144,7 @@ xfs_dir2_sf_to_block(
1144 */ 1144 */
1145 dep = (xfs_dir2_data_entry_t *) 1145 dep = (xfs_dir2_data_entry_t *)
1146 ((char *)block + XFS_DIR2_DATA_DOTDOT_OFFSET); 1146 ((char *)block + XFS_DIR2_DATA_DOTDOT_OFFSET);
1147 INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)); 1147 dep->inumber = cpu_to_be64(XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent));
1148 dep->namelen = 2; 1148 dep->namelen = 2;
1149 dep->name[0] = dep->name[1] = '.'; 1149 dep->name[0] = dep->name[1] = '.';
1150 tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); 1150 tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
@@ -1193,7 +1193,7 @@ xfs_dir2_sf_to_block(
1193 * Copy a real entry. 1193 * Copy a real entry.
1194 */ 1194 */
1195 dep = (xfs_dir2_data_entry_t *)((char *)block + newoffset); 1195 dep = (xfs_dir2_data_entry_t *)((char *)block + newoffset);
1196 INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER(sfp, 1196 dep->inumber = cpu_to_be64(XFS_DIR2_SF_GET_INUMBER(sfp,
1197 XFS_DIR2_SF_INUMBERP(sfep))); 1197 XFS_DIR2_SF_INUMBERP(sfep)));
1198 dep->namelen = sfep->namelen; 1198 dep->namelen = sfep->namelen;
1199 memcpy(dep->name, sfep->name, dep->namelen); 1199 memcpy(dep->name, sfep->name, dep->namelen);