git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ocfs2: ->rl_count endianness breakage
[pandora-kernel.git]
/
fs
/
ocfs2
/
refcounttree.c
diff --git
a/fs/ocfs2/refcounttree.c
b/fs/ocfs2/refcounttree.c
index
cf78233
..
9f32d7c
100644
(file)
--- a/
fs/ocfs2/refcounttree.c
+++ b/
fs/ocfs2/refcounttree.c
@@
-1036,14
+1036,14
@@
static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
tmp_el = left_path->p_node[subtree_root].el;
blkno = left_path->p_node[subtree_root+1].bh->b_blocknr;
tmp_el = left_path->p_node[subtree_root].el;
blkno = left_path->p_node[subtree_root+1].bh->b_blocknr;
- for (i = 0; i < le
32
_to_cpu(tmp_el->l_next_free_rec); i++) {
+ for (i = 0; i < le
16
_to_cpu(tmp_el->l_next_free_rec); i++) {
if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) {
*cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos);
break;
}
}
if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) {
*cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos);
break;
}
}
- BUG_ON(i == le
32
_to_cpu(tmp_el->l_next_free_rec));
+ BUG_ON(i == le
16
_to_cpu(tmp_el->l_next_free_rec));
out:
ocfs2_free_path(left_path);
out:
ocfs2_free_path(left_path);
@@
-1468,7
+1468,7
@@
static int ocfs2_divide_leaf_refcount_block(struct buffer_head *ref_leaf_bh,
trace_ocfs2_divide_leaf_refcount_block(
(unsigned long long)ref_leaf_bh->b_blocknr,
trace_ocfs2_divide_leaf_refcount_block(
(unsigned long long)ref_leaf_bh->b_blocknr,
- le
32_to_cpu(rl->rl_count), le32
_to_cpu(rl->rl_used));
+ le
16_to_cpu(rl->rl_count), le16
_to_cpu(rl->rl_used));
/*
* XXX: Improvement later.
/*
* XXX: Improvement later.
@@
-2411,7
+2411,7
@@
static int ocfs2_calc_refcount_meta_credits(struct super_block *sb,
rb = (struct ocfs2_refcount_block *)
prev_bh->b_data;
rb = (struct ocfs2_refcount_block *)
prev_bh->b_data;
- if (le
64
_to_cpu(rb->rf_records.rl_used) +
+ if (le
16
_to_cpu(rb->rf_records.rl_used) +
recs_add >
le16_to_cpu(rb->rf_records.rl_count))
ref_blocks++;
recs_add >
le16_to_cpu(rb->rf_records.rl_count))
ref_blocks++;
@@
-2476,7
+2476,7
@@
static int ocfs2_calc_refcount_meta_credits(struct super_block *sb,
if (prev_bh) {
rb = (struct ocfs2_refcount_block *)prev_bh->b_data;
if (prev_bh) {
rb = (struct ocfs2_refcount_block *)prev_bh->b_data;
- if (le
64
_to_cpu(rb->rf_records.rl_used) + recs_add >
+ if (le
16
_to_cpu(rb->rf_records.rl_used) + recs_add >
le16_to_cpu(rb->rf_records.rl_count))
ref_blocks++;
le16_to_cpu(rb->rf_records.rl_count))
ref_blocks++;
@@
-3629,7
+3629,7
@@
int ocfs2_refcounted_xattr_delete_need(struct inode *inode,
* one will split a refcount rec, so totally we need
* clusters * 2 new refcount rec.
*/
* one will split a refcount rec, so totally we need
* clusters * 2 new refcount rec.
*/
- if (le
64
_to_cpu(rb->rf_records.rl_used) + clusters * 2 >
+ if (le
16
_to_cpu(rb->rf_records.rl_used) + clusters * 2 >
le16_to_cpu(rb->rf_records.rl_count))
ref_blocks++;
le16_to_cpu(rb->rf_records.rl_count))
ref_blocks++;