Skip to content

Commit 3a251f0

Browse files
author
Al Viro
committed
ocfs2: ->l_next_free_req breakage on big-endian
It's le16, not le32... Signed-off-by: Al Viro <[email protected]>
1 parent 6ed3cf2 commit 3a251f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fs/ocfs2/alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ static int ocfs2_adjust_rightmost_branch(handle_t *handle,
11341134
}
11351135

11361136
el = path_leaf_el(path);
1137-
rec = &el->l_recs[le32_to_cpu(el->l_next_free_rec) - 1];
1137+
rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec) - 1];
11381138

11391139
ocfs2_adjust_rightmost_records(handle, et, path, rec);
11401140

fs/ocfs2/refcounttree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,14 +1036,14 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
10361036

10371037
tmp_el = left_path->p_node[subtree_root].el;
10381038
blkno = left_path->p_node[subtree_root+1].bh->b_blocknr;
1039-
for (i = 0; i < le32_to_cpu(tmp_el->l_next_free_rec); i++) {
1039+
for (i = 0; i < le16_to_cpu(tmp_el->l_next_free_rec); i++) {
10401040
if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) {
10411041
*cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos);
10421042
break;
10431043
}
10441044
}
10451045

1046-
BUG_ON(i == le32_to_cpu(tmp_el->l_next_free_rec));
1046+
BUG_ON(i == le16_to_cpu(tmp_el->l_next_free_rec));
10471047

10481048
out:
10491049
ocfs2_free_path(left_path);

0 commit comments

Comments
 (0)