diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/alloc.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/refcounttree.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/suballoc.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 3165aebb43c8..31b9463fba1f 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -1134,7 +1134,7 @@ static int ocfs2_adjust_rightmost_branch(handle_t *handle, | |||
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | el = path_leaf_el(path); | 1136 | 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]; |
1138 | 1138 | ||
1139 | ocfs2_adjust_rightmost_records(handle, et, path, rec); | 1139 | ocfs2_adjust_rightmost_records(handle, et, path, rec); |
1140 | 1140 | ||
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 044e7b58d31c..1bfe8802cc1e 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -2005,7 +2005,7 @@ static int o2net_open_listening_sock(__be32 addr, __be16 port) | |||
2005 | o2net_listen_sock = sock; | 2005 | o2net_listen_sock = sock; |
2006 | INIT_WORK(&o2net_listen_work, o2net_accept_many); | 2006 | INIT_WORK(&o2net_listen_work, o2net_accept_many); |
2007 | 2007 | ||
2008 | sock->sk->sk_reuse = 1; | 2008 | sock->sk->sk_reuse = SK_CAN_REUSE; |
2009 | ret = sock->ops->bind(sock, (struct sockaddr *)&sin, sizeof(sin)); | 2009 | ret = sock->ops->bind(sock, (struct sockaddr *)&sin, sizeof(sin)); |
2010 | if (ret < 0) { | 2010 | if (ret < 0) { |
2011 | printk(KERN_ERR "o2net: Error %d while binding socket at " | 2011 | printk(KERN_ERR "o2net: Error %d while binding socket at " |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index cf7823382664..9f32d7cbb7a3 100644 --- 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, | |||
1036 | 1036 | ||
1037 | tmp_el = left_path->p_node[subtree_root].el; | 1037 | tmp_el = left_path->p_node[subtree_root].el; |
1038 | blkno = left_path->p_node[subtree_root+1].bh->b_blocknr; | 1038 | 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++) { |
1040 | if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) { | 1040 | if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) { |
1041 | *cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos); | 1041 | *cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos); |
1042 | break; | 1042 | break; |
1043 | } | 1043 | } |
1044 | } | 1044 | } |
1045 | 1045 | ||
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)); |
1047 | 1047 | ||
1048 | out: | 1048 | out: |
1049 | ocfs2_free_path(left_path); | 1049 | ocfs2_free_path(left_path); |
@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_block(struct buffer_head *ref_leaf_bh, | |||
1468 | 1468 | ||
1469 | trace_ocfs2_divide_leaf_refcount_block( | 1469 | trace_ocfs2_divide_leaf_refcount_block( |
1470 | (unsigned long long)ref_leaf_bh->b_blocknr, | 1470 | (unsigned long long)ref_leaf_bh->b_blocknr, |
1471 | le32_to_cpu(rl->rl_count), le32_to_cpu(rl->rl_used)); | 1471 | le16_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used)); |
1472 | 1472 | ||
1473 | /* | 1473 | /* |
1474 | * XXX: Improvement later. | 1474 | * XXX: Improvement later. |
@@ -2411,7 +2411,7 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb, | |||
2411 | rb = (struct ocfs2_refcount_block *) | 2411 | rb = (struct ocfs2_refcount_block *) |
2412 | prev_bh->b_data; | 2412 | prev_bh->b_data; |
2413 | 2413 | ||
2414 | if (le64_to_cpu(rb->rf_records.rl_used) + | 2414 | if (le16_to_cpu(rb->rf_records.rl_used) + |
2415 | recs_add > | 2415 | recs_add > |
2416 | le16_to_cpu(rb->rf_records.rl_count)) | 2416 | le16_to_cpu(rb->rf_records.rl_count)) |
2417 | ref_blocks++; | 2417 | ref_blocks++; |
@@ -2476,7 +2476,7 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb, | |||
2476 | if (prev_bh) { | 2476 | if (prev_bh) { |
2477 | rb = (struct ocfs2_refcount_block *)prev_bh->b_data; | 2477 | rb = (struct ocfs2_refcount_block *)prev_bh->b_data; |
2478 | 2478 | ||
2479 | if (le64_to_cpu(rb->rf_records.rl_used) + recs_add > | 2479 | if (le16_to_cpu(rb->rf_records.rl_used) + recs_add > |
2480 | le16_to_cpu(rb->rf_records.rl_count)) | 2480 | le16_to_cpu(rb->rf_records.rl_count)) |
2481 | ref_blocks++; | 2481 | ref_blocks++; |
2482 | 2482 | ||
@@ -3629,7 +3629,7 @@ int ocfs2_refcounted_xattr_delete_need(struct inode *inode, | |||
3629 | * one will split a refcount rec, so totally we need | 3629 | * one will split a refcount rec, so totally we need |
3630 | * clusters * 2 new refcount rec. | 3630 | * clusters * 2 new refcount rec. |
3631 | */ | 3631 | */ |
3632 | if (le64_to_cpu(rb->rf_records.rl_used) + clusters * 2 > | 3632 | if (le16_to_cpu(rb->rf_records.rl_used) + clusters * 2 > |
3633 | le16_to_cpu(rb->rf_records.rl_count)) | 3633 | le16_to_cpu(rb->rf_records.rl_count)) |
3634 | ref_blocks++; | 3634 | ref_blocks++; |
3635 | 3635 | ||
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; |