Skip to content

Commit

Permalink
dm btree: use pop_frame in dm_btree_del to cleanup code
Browse files Browse the repository at this point in the history
Remove a visited leaf straight away from the stack, rather than
marking all it's children as visited and letting it get removed on the
next iteration.  May also offer a micro optimisation in dm_btree_del.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
jthornber authored and snitm committed Aug 23, 2013
1 parent c9ec5d7 commit cd5acf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/persistent-data/dm-btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ int dm_btree_del(struct dm_btree_info *info, dm_block_t root)
info->value_type.dec(info->value_type.context,
value_ptr(f->n, i));
}
f->current_child = f->nr_children;
pop_frame(s);
}
}

Expand Down

0 comments on commit cd5acf0

Please sign in to comment.