Skip to content

Commit 72094e4

Browse files
author
Al Viro
committed
ocfs2: ->e_leaf_clusters endianness breakage
le16, not le32... Signed-off-by: Al Viro <[email protected]>
1 parent 28748b3 commit 72094e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ocfs2/suballoc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ static void ocfs2_bg_alloc_cleanup(handle_t *handle,
600600
ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode,
601601
cluster_ac->ac_bh,
602602
le64_to_cpu(rec->e_blkno),
603-
le32_to_cpu(rec->e_leaf_clusters));
603+
le16_to_cpu(rec->e_leaf_clusters));
604604
if (ret)
605605
mlog_errno(ret);
606606
/* Try all the clusters to free */
@@ -1628,7 +1628,7 @@ static int ocfs2_bg_discontig_fix_by_rec(struct ocfs2_suballoc_result *res,
16281628
{
16291629
unsigned int bpc = le16_to_cpu(cl->cl_bpc);
16301630
unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc;
1631-
unsigned int bitcount = le32_to_cpu(rec->e_leaf_clusters) * bpc;
1631+
unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc;
16321632

16331633
if (res->sr_bit_offset < bitoff)
16341634
return 0;

0 commit comments

Comments
 (0)