forked from luck/tmp_suning_uos_patched
ocfs2: ->e_leaf_clusters endianness breakage
le16, not le32... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
28748b325d
commit
72094e43e3
|
@ -600,7 +600,7 @@ static void ocfs2_bg_alloc_cleanup(handle_t *handle,
|
||||||
ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode,
|
ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode,
|
||||||
cluster_ac->ac_bh,
|
cluster_ac->ac_bh,
|
||||||
le64_to_cpu(rec->e_blkno),
|
le64_to_cpu(rec->e_blkno),
|
||||||
le32_to_cpu(rec->e_leaf_clusters));
|
le16_to_cpu(rec->e_leaf_clusters));
|
||||||
if (ret)
|
if (ret)
|
||||||
mlog_errno(ret);
|
mlog_errno(ret);
|
||||||
/* Try all the clusters to free */
|
/* Try all the clusters to free */
|
||||||
|
@ -1628,7 +1628,7 @@ static int ocfs2_bg_discontig_fix_by_rec(struct ocfs2_suballoc_result *res,
|
||||||
{
|
{
|
||||||
unsigned int bpc = le16_to_cpu(cl->cl_bpc);
|
unsigned int bpc = le16_to_cpu(cl->cl_bpc);
|
||||||
unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc;
|
unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc;
|
||||||
unsigned int bitcount = le32_to_cpu(rec->e_leaf_clusters) * bpc;
|
unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc;
|
||||||
|
|
||||||
if (res->sr_bit_offset < bitoff)
|
if (res->sr_bit_offset < bitoff)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user