Skip to content

Commit d22aa61

Browse files
Changwei Getorvalds
authored andcommitted
ocfs2: clean up dead code in alloc.c
Some stack variables are no longer used but still assigned. Trim them. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Changwei Ge <[email protected]> Reviewed-by: Jun Piao <[email protected]> Reviewed-by: Alex Chen <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Joseph Qi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c0a1a6d commit d22aa61

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

fs/ocfs2/alloc.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,11 +2598,8 @@ static void ocfs2_unlink_subtree(handle_t *handle,
25982598
int i;
25992599
struct buffer_head *root_bh = left_path->p_node[subtree_index].bh;
26002600
struct ocfs2_extent_list *root_el = left_path->p_node[subtree_index].el;
2601-
struct ocfs2_extent_list *el;
26022601
struct ocfs2_extent_block *eb;
26032602

2604-
el = path_leaf_el(left_path);
2605-
26062603
eb = (struct ocfs2_extent_block *)right_path->p_node[subtree_index + 1].bh->b_data;
26072604

26082605
for(i = 1; i < le16_to_cpu(root_el->l_next_free_rec); i++)
@@ -3938,7 +3935,7 @@ static void ocfs2_adjust_rightmost_records(handle_t *handle,
39383935
struct ocfs2_path *path,
39393936
struct ocfs2_extent_rec *insert_rec)
39403937
{
3941-
int ret, i, next_free;
3938+
int i, next_free;
39423939
struct buffer_head *bh;
39433940
struct ocfs2_extent_list *el;
39443941
struct ocfs2_extent_rec *rec;
@@ -3955,7 +3952,6 @@ static void ocfs2_adjust_rightmost_records(handle_t *handle,
39553952
ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),
39563953
"Owner %llu has a bad extent list\n",
39573954
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci));
3958-
ret = -EIO;
39593955
return;
39603956
}
39613957

@@ -5057,7 +5053,6 @@ int ocfs2_split_extent(handle_t *handle,
50575053
struct buffer_head *last_eb_bh = NULL;
50585054
struct ocfs2_extent_rec *rec = &el->l_recs[split_index];
50595055
struct ocfs2_merge_ctxt ctxt;
5060-
struct ocfs2_extent_list *rightmost_el;
50615056

50625057
if (le32_to_cpu(rec->e_cpos) > le32_to_cpu(split_rec->e_cpos) ||
50635058
((le32_to_cpu(rec->e_cpos) + le16_to_cpu(rec->e_leaf_clusters)) <
@@ -5093,9 +5088,7 @@ int ocfs2_split_extent(handle_t *handle,
50935088
}
50945089

50955090
eb = (struct ocfs2_extent_block *) last_eb_bh->b_data;
5096-
rightmost_el = &eb->h_list;
5097-
} else
5098-
rightmost_el = path_root_el(path);
5091+
}
50995092

51005093
if (rec->e_cpos == split_rec->e_cpos &&
51015094
rec->e_leaf_clusters == split_rec->e_leaf_clusters)

0 commit comments

Comments
 (0)