summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_attr_leaf.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-03-17 17:29:31 +1100
committerNathan Scott <nathans@sgi.com>2006-03-17 17:29:31 +1100
commit984a081a7c89ea7e1b6f47cbc0e5c8ef67ad6e09 (patch)
tree3f2a268952942567ccb43e1386644aa22a2cf5b2 /fs/xfs/xfs_attr_leaf.c
parent3b244aa81ecb06859e0c16abf4c26404c1d86591 (diff)
[XFS] store xfs_attr_sf_sort in native endian
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25502a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.c')
-rw-r--r--fs/xfs/xfs_attr_leaf.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 37d2e10f874..e4071eb1e6c 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -513,11 +513,9 @@ xfs_attr_shortform_compare(const void *a, const void *b)
sa = (xfs_attr_sf_sort_t *)a;
sb = (xfs_attr_sf_sort_t *)b;
- if (INT_GET(sa->hash, ARCH_CONVERT)
- < INT_GET(sb->hash, ARCH_CONVERT)) {
+ if (sa->hash < sb->hash) {
return(-1);
- } else if (INT_GET(sa->hash, ARCH_CONVERT)
- > INT_GET(sb->hash, ARCH_CONVERT)) {
+ } else if (sa->hash > sb->hash) {
return(1);
} else {
return(sa->entno - sb->entno);
@@ -631,8 +629,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
continue;
}
sbp->entno = i;
- INT_SET(sbp->hash, ARCH_CONVERT,
- xfs_da_hashname((char *)sfe->nameval, sfe->namelen));
+ sbp->hash = xfs_da_hashname((char *)sfe->nameval, sfe->namelen);
sbp->name = (char *)sfe->nameval;
sbp->namelen = sfe->namelen;
/* These are bytes, and both on-disk, don't endian-flip */
@@ -655,12 +652,12 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
cursor->initted = 1;
cursor->blkno = 0;
for (sbp = sbuf, i = 0; i < nsbuf; i++, sbp++) {
- if (INT_GET(sbp->hash, ARCH_CONVERT) == cursor->hashval) {
+ if (sbp->hash == cursor->hashval) {
if (cursor->offset == count) {
break;
}
count++;
- } else if (INT_GET(sbp->hash, ARCH_CONVERT) > cursor->hashval) {
+ } else if (sbp->hash > cursor->hashval) {
break;
}
}
@@ -680,8 +677,8 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
((sbp->flags & XFS_ATTR_ROOT) ? &attr_trusted :
&attr_user);
- if (cursor->hashval != INT_GET(sbp->hash, ARCH_CONVERT)) {
- cursor->hashval = INT_GET(sbp->hash, ARCH_CONVERT);
+ if (cursor->hashval != sbp->hash) {
+ cursor->hashval = sbp->hash;
cursor->offset = 0;
}
if (context->flags & ATTR_KERNOVAL) {