Skip to content

Commit

Permalink
ocfs2: remove unused variable
Browse files Browse the repository at this point in the history
delete_tail_recs in ocfs2_try_to_merge_extent() was only ever set, remove
it.

Signed-off-by: Tao Mao <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Tao Mao authored and Mark Fasheh committed Oct 12, 2007
1 parent c77534f commit 518d726
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2807,36 +2807,28 @@ static int ocfs2_try_to_merge_extent(struct inode *inode,
struct ocfs2_merge_ctxt *ctxt)

{
int ret = 0, delete_tail_recs = 0;
int ret = 0;
struct ocfs2_extent_list *el = path_leaf_el(left_path);
struct ocfs2_extent_rec *rec = &el->l_recs[split_index];

BUG_ON(ctxt->c_contig_type == CONTIG_NONE);

if (ctxt->c_split_covers_rec) {
delete_tail_recs++;

if (ctxt->c_contig_type == CONTIG_LEFTRIGHT ||
ctxt->c_has_empty_extent)
delete_tail_recs++;

if (ctxt->c_has_empty_extent) {
/*
* The merge code will need to create an empty
* extent to take the place of the newly
* emptied slot. Remove any pre-existing empty
* extents - having more than one in a leaf is
* illegal.
*/
ret = ocfs2_rotate_tree_left(inode, handle, left_path,
dealloc);
if (ret) {
mlog_errno(ret);
goto out;
}
split_index--;
rec = &el->l_recs[split_index];
if (ctxt->c_split_covers_rec && ctxt->c_has_empty_extent) {
/*
* The merge code will need to create an empty
* extent to take the place of the newly
* emptied slot. Remove any pre-existing empty
* extents - having more than one in a leaf is
* illegal.
*/
ret = ocfs2_rotate_tree_left(inode, handle, left_path,
dealloc);
if (ret) {
mlog_errno(ret);
goto out;
}
split_index--;
rec = &el->l_recs[split_index];
}

if (ctxt->c_contig_type == CONTIG_LEFTRIGHT) {
Expand Down

0 comments on commit 518d726

Please sign in to comment.