diff options
Diffstat (limited to 'fs/xfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index ddbe453fade2..c32894cb6223 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c | |||
@@ -151,14 +151,14 @@ xfs_dir2_leaf_to_node( | |||
151 | */ | 151 | */ |
152 | free->hdr.magic = cpu_to_be32(XFS_DIR2_FREE_MAGIC); | 152 | free->hdr.magic = cpu_to_be32(XFS_DIR2_FREE_MAGIC); |
153 | free->hdr.firstdb = 0; | 153 | free->hdr.firstdb = 0; |
154 | ASSERT(INT_GET(ltp->bestcount, ARCH_CONVERT) <= (uint)dp->i_d.di_size / mp->m_dirblksize); | 154 | ASSERT(be32_to_cpu(ltp->bestcount) <= (uint)dp->i_d.di_size / mp->m_dirblksize); |
155 | free->hdr.nvalid = ltp->bestcount; | 155 | free->hdr.nvalid = ltp->bestcount; |
156 | /* | 156 | /* |
157 | * Copy freespace entries from the leaf block to the new block. | 157 | * Copy freespace entries from the leaf block to the new block. |
158 | * Count active entries. | 158 | * Count active entries. |
159 | */ | 159 | */ |
160 | for (i = n = 0, from = XFS_DIR2_LEAF_BESTS_P(ltp), to = free->bests; | 160 | for (i = n = 0, from = XFS_DIR2_LEAF_BESTS_P(ltp), to = free->bests; |
161 | i < INT_GET(ltp->bestcount, ARCH_CONVERT); i++, from++, to++) { | 161 | i < be32_to_cpu(ltp->bestcount); i++, from++, to++) { |
162 | if ((off = be16_to_cpu(*from)) != NULLDATAOFF) | 162 | if ((off = be16_to_cpu(*from)) != NULLDATAOFF) |
163 | n++; | 163 | n++; |
164 | *to = cpu_to_be16(off); | 164 | *to = cpu_to_be16(off); |