Commit 518d7269 authored by Tao Mao's avatar Tao Mao Committed by Mark Fasheh

ocfs2: remove unused variable

delete_tail_recs in ocfs2_try_to_merge_extent() was only ever set, remove
it.
Signed-off-by: default avatarTao Mao <tao.ma@oracle.com>
Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent c77534f6
...@@ -2807,36 +2807,28 @@ static int ocfs2_try_to_merge_extent(struct inode *inode, ...@@ -2807,36 +2807,28 @@ static int ocfs2_try_to_merge_extent(struct inode *inode,
struct ocfs2_merge_ctxt *ctxt) 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_list *el = path_leaf_el(left_path);
struct ocfs2_extent_rec *rec = &el->l_recs[split_index]; struct ocfs2_extent_rec *rec = &el->l_recs[split_index];
BUG_ON(ctxt->c_contig_type == CONTIG_NONE); BUG_ON(ctxt->c_contig_type == CONTIG_NONE);
if (ctxt->c_split_covers_rec) { if (ctxt->c_split_covers_rec && ctxt->c_has_empty_extent) {
delete_tail_recs++; /*
* The merge code will need to create an empty
if (ctxt->c_contig_type == CONTIG_LEFTRIGHT || * extent to take the place of the newly
ctxt->c_has_empty_extent) * emptied slot. Remove any pre-existing empty
delete_tail_recs++; * extents - having more than one in a leaf is
* illegal.
if (ctxt->c_has_empty_extent) { */
/* ret = ocfs2_rotate_tree_left(inode, handle, left_path,
* The merge code will need to create an empty dealloc);
* extent to take the place of the newly if (ret) {
* emptied slot. Remove any pre-existing empty mlog_errno(ret);
* extents - having more than one in a leaf is goto out;
* 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];
} }
split_index--;
rec = &el->l_recs[split_index];
} }
if (ctxt->c_contig_type == CONTIG_LEFTRIGHT) { if (ctxt->c_contig_type == CONTIG_LEFTRIGHT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment