aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dir2_data.c')
-rw-r--r--fs/xfs/xfs_dir2_data.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c
index 0af757873be5..084b134361aa 100644
--- a/fs/xfs/xfs_dir2_data.c
+++ b/fs/xfs/xfs_dir2_data.c
@@ -144,8 +144,8 @@ xfs_dir2_data_check(
144 ((char *)dep - (char *)d)); 144 ((char *)dep - (char *)d));
145 hash = xfs_da_hashname((char *)dep->name, dep->namelen); 145 hash = xfs_da_hashname((char *)dep->name, dep->namelen);
146 for (i = 0; i < be32_to_cpu(btp->count); i++) { 146 for (i = 0; i < be32_to_cpu(btp->count); i++) {
147 if (INT_GET(lep[i].address, ARCH_CONVERT) == addr && 147 if (be32_to_cpu(lep[i].address) == addr &&
148 INT_GET(lep[i].hashval, ARCH_CONVERT) == hash) 148 be32_to_cpu(lep[i].hashval) == hash)
149 break; 149 break;
150 } 150 }
151 ASSERT(i < be32_to_cpu(btp->count)); 151 ASSERT(i < be32_to_cpu(btp->count));
@@ -158,10 +158,10 @@ xfs_dir2_data_check(
158 ASSERT(freeseen == 7); 158 ASSERT(freeseen == 7);
159 if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) { 159 if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) {
160 for (i = stale = 0; i < be32_to_cpu(btp->count); i++) { 160 for (i = stale = 0; i < be32_to_cpu(btp->count); i++) {
161 if (INT_GET(lep[i].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) 161 if (be32_to_cpu(lep[i].address) == XFS_DIR2_NULL_DATAPTR)
162 stale++; 162 stale++;
163 if (i > 0) 163 if (i > 0)
164 ASSERT(INT_GET(lep[i].hashval, ARCH_CONVERT) >= INT_GET(lep[i - 1].hashval, ARCH_CONVERT)); 164 ASSERT(be32_to_cpu(lep[i].hashval) >= be32_to_cpu(lep[i - 1].hashval));
165 } 165 }
166 ASSERT(count == be32_to_cpu(btp->count) - be32_to_cpu(btp->stale)); 166 ASSERT(count == be32_to_cpu(btp->count) - be32_to_cpu(btp->stale));
167 ASSERT(stale == be32_to_cpu(btp->stale)); 167 ASSERT(stale == be32_to_cpu(btp->stale));