aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/suballoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r--fs/ocfs2/suballoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
index ba5d97e4a73e..f169da4624fd 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -600,7 +600,7 @@ static void ocfs2_bg_alloc_cleanup(handle_t *handle,
600 ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode, 600 ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode,
601 cluster_ac->ac_bh, 601 cluster_ac->ac_bh,
602 le64_to_cpu(rec->e_blkno), 602 le64_to_cpu(rec->e_blkno),
603 le32_to_cpu(rec->e_leaf_clusters)); 603 le16_to_cpu(rec->e_leaf_clusters));
604 if (ret) 604 if (ret)
605 mlog_errno(ret); 605 mlog_errno(ret);
606 /* Try all the clusters to free */ 606 /* Try all the clusters to free */
@@ -1628,7 +1628,7 @@ static int ocfs2_bg_discontig_fix_by_rec(struct ocfs2_suballoc_result *res,
1628{ 1628{
1629 unsigned int bpc = le16_to_cpu(cl->cl_bpc); 1629 unsigned int bpc = le16_to_cpu(cl->cl_bpc);
1630 unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc; 1630 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;
1632 1632
1633 if (res->sr_bit_offset < bitoff) 1633 if (res->sr_bit_offset < bitoff)
1634 return 0; 1634 return 0;