diff options
Diffstat (limited to 'fs/xfs/xfs_dir2_data.c')
-rw-r--r-- | fs/xfs/xfs_dir2_data.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c index acb61132dec4..0af757873be5 100644 --- a/fs/xfs/xfs_dir2_data.c +++ b/fs/xfs/xfs_dir2_data.c | |||
@@ -143,12 +143,12 @@ xfs_dir2_data_check( | |||
143 | (xfs_dir2_data_aoff_t) | 143 | (xfs_dir2_data_aoff_t) |
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 < INT_GET(btp->count, ARCH_CONVERT); i++) { | 146 | for (i = 0; i < be32_to_cpu(btp->count); i++) { |
147 | if (INT_GET(lep[i].address, ARCH_CONVERT) == addr && | 147 | if (INT_GET(lep[i].address, ARCH_CONVERT) == addr && |
148 | INT_GET(lep[i].hashval, ARCH_CONVERT) == hash) | 148 | INT_GET(lep[i].hashval, ARCH_CONVERT) == hash) |
149 | break; | 149 | break; |
150 | } | 150 | } |
151 | ASSERT(i < INT_GET(btp->count, ARCH_CONVERT)); | 151 | ASSERT(i < be32_to_cpu(btp->count)); |
152 | } | 152 | } |
153 | p += XFS_DIR2_DATA_ENTSIZE(dep->namelen); | 153 | p += XFS_DIR2_DATA_ENTSIZE(dep->namelen); |
154 | } | 154 | } |
@@ -157,14 +157,14 @@ xfs_dir2_data_check( | |||
157 | */ | 157 | */ |
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 < INT_GET(btp->count, ARCH_CONVERT); 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 (INT_GET(lep[i].address, ARCH_CONVERT) == 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(INT_GET(lep[i].hashval, ARCH_CONVERT) >= INT_GET(lep[i - 1].hashval, ARCH_CONVERT)); |
165 | } | 165 | } |
166 | ASSERT(count == INT_GET(btp->count, ARCH_CONVERT) - INT_GET(btp->stale, ARCH_CONVERT)); | 166 | ASSERT(count == be32_to_cpu(btp->count) - be32_to_cpu(btp->stale)); |
167 | ASSERT(stale == INT_GET(btp->stale, ARCH_CONVERT)); | 167 | ASSERT(stale == be32_to_cpu(btp->stale)); |
168 | } | 168 | } |
169 | } | 169 | } |
170 | #endif | 170 | #endif |